Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
1d730e4b
Commit
1d730e4b
authored
17 years ago
by
deuce
Browse files
Options
Downloads
Patches
Plain Diff
More modem fixes... still doesn't properly detect remote disconnections.
parent
323992d1
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/syncterm/modem.c
+4
-6
4 additions, 6 deletions
src/syncterm/modem.c
with
4 additions
and
6 deletions
src/syncterm/modem.c
+
4
−
6
View file @
1d730e4b
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
#include
"conn.h"
#include
"conn.h"
#include
"uifcinit.h"
#include
"uifcinit.h"
static
COM_HANDLE
com
=
INVALID
_SOCKET
;
static
COM_HANDLE
com
=
COM_HANDLE_
INVALID
;
#ifdef __BORLANDC__
#ifdef __BORLANDC__
#pragma argsused
#pragma argsused
...
@@ -26,10 +26,6 @@ void modem_input_thread(void *args)
...
@@ -26,10 +26,6 @@ void modem_input_thread(void *args)
conn_api
.
input_thread_running
=
1
;
conn_api
.
input_thread_running
=
1
;
while
(
com
!=
COM_HANDLE_INVALID
&&
!
conn_api
.
terminate
)
{
while
(
com
!=
COM_HANDLE_INVALID
&&
!
conn_api
.
terminate
)
{
rd
=
comReadBuf
(
com
,
conn_api
.
rd_buf
,
conn_api
.
rd_buf_size
,
NULL
,
100
);
rd
=
comReadBuf
(
com
,
conn_api
.
rd_buf
,
conn_api
.
rd_buf_size
,
NULL
,
100
);
if
(
rd
<=
0
)
{
if
(
comGetModemStatus
(
com
)
&
COM_DCD
==
0
)
break
;
}
buffered
=
0
;
buffered
=
0
;
while
(
buffered
<
rd
)
{
while
(
buffered
<
rd
)
{
pthread_mutex_lock
(
&
(
conn_inbuf
.
mutex
));
pthread_mutex_lock
(
&
(
conn_inbuf
.
mutex
));
...
@@ -37,6 +33,8 @@ void modem_input_thread(void *args)
...
@@ -37,6 +33,8 @@ void modem_input_thread(void *args)
buffered
+=
conn_buf_put
(
&
conn_inbuf
,
conn_api
.
rd_buf
+
buffered
,
buffer
);
buffered
+=
conn_buf_put
(
&
conn_inbuf
,
conn_api
.
rd_buf
+
buffered
,
buffer
);
pthread_mutex_unlock
(
&
(
conn_inbuf
.
mutex
));
pthread_mutex_unlock
(
&
(
conn_inbuf
.
mutex
));
}
}
if
(
comGetModemStatus
(
com
)
&
COM_DCD
==
0
)
break
;
}
}
conn_api
.
input_thread_running
=
0
;
conn_api
.
input_thread_running
=
0
;
}
}
...
@@ -176,7 +174,7 @@ int modem_connect(struct bbslist *bbs)
...
@@ -176,7 +174,7 @@ int modem_connect(struct bbslist *bbs)
conn_api
.
terminate
=-
1
;
conn_api
.
terminate
=-
1
;
return
(
-
1
);
return
(
-
1
);
}
}
if
(
strstr
(
respbuf
,
"ATA"
))
/* Dial command echoed */
if
(
strstr
(
respbuf
,
bbs
->
addr
))
/* Dial command echoed */
continue
;
continue
;
break
;
break
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment