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
0e6055de
Commit
0e6055de
authored
17 years ago
by
rswindell
Browse files
Options
Downloads
Patches
Plain Diff
Display modem responses in pop-up messages.
parent
174c4c70
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/syncterm/modem.c
+8
-5
8 additions, 5 deletions
src/syncterm/modem.c
with
8 additions
and
5 deletions
src/syncterm/modem.c
+
8
−
5
View file @
0e6055de
...
@@ -127,7 +127,7 @@ int modem_connect(struct bbslist *bbs)
...
@@ -127,7 +127,7 @@ int modem_connect(struct bbslist *bbs)
}
}
if
(
settings
.
mdm
.
com_rate
)
{
if
(
settings
.
mdm
.
com_rate
)
{
if
(
!
comSetBaudRate
(
com
,
settings
.
mdm
.
com_rate
))
{
if
(
!
comSetBaudRate
(
com
,
settings
.
mdm
.
com_rate
))
{
uifcmsg
(
"Cannot Set Baud
r
ate"
,
"`Cannot Set Baud
r
ate`
\n\n
"
uifcmsg
(
"Cannot Set Baud
R
ate"
,
"`Cannot Set Baud
R
ate`
\n\n
"
"Cannot open the specified modem device.
\n
"
);
"Cannot open the specified modem device.
\n
"
);
conn_api
.
terminate
=-
1
;
conn_api
.
terminate
=-
1
;
return
(
-
1
);
return
(
-
1
);
...
@@ -169,8 +169,8 @@ int modem_connect(struct bbslist *bbs)
...
@@ -169,8 +169,8 @@ int modem_connect(struct bbslist *bbs)
if
(
!
strstr
(
respbuf
,
"OK"
))
{
if
(
!
strstr
(
respbuf
,
"OK"
))
{
modem_close
();
modem_close
();
uifc
.
pop
(
NULL
);
uifc
.
pop
(
NULL
);
uifcmsg
(
"Initialization Error"
,
"`Initialization Error`
\n\n
"
uifcmsg
(
respbuf
,
"`Initialization Error`
\n\n
"
"
Y
our initialization string
caused an error
.
\n
"
);
"
The modem did not respond favorably to y
our initialization string.
\n
"
);
conn_api
.
terminate
=-
1
;
conn_api
.
terminate
=-
1
;
return
(
-
1
);
return
(
-
1
);
}
}
...
@@ -187,7 +187,7 @@ int modem_connect(struct bbslist *bbs)
...
@@ -187,7 +187,7 @@ int modem_connect(struct bbslist *bbs)
modem_close
();
modem_close
();
uifc
.
pop
(
NULL
);
uifc
.
pop
(
NULL
);
if
(
ret
<
0
)
if
(
ret
<
0
)
uifcmsg
(
"No Answer"
,
"`No Answer`
\n\n
"
uifcmsg
(
respbuf
,
"`No Answer`
\n\n
"
"The modem did not connect within 30 seconds.
\n
"
);
"The modem did not connect within 30 seconds.
\n
"
);
conn_api
.
terminate
=-
1
;
conn_api
.
terminate
=-
1
;
return
(
-
1
);
return
(
-
1
);
...
@@ -200,12 +200,15 @@ int modem_connect(struct bbslist *bbs)
...
@@ -200,12 +200,15 @@ int modem_connect(struct bbslist *bbs)
if
(
!
strstr
(
respbuf
,
"CONNECT"
))
{
if
(
!
strstr
(
respbuf
,
"CONNECT"
))
{
modem_close
();
modem_close
();
uifc
.
pop
(
NULL
);
uifc
.
pop
(
NULL
);
uifcmsg
(
"Connection Failed"
,
"`Connection Failed`
\n\n
"
uifcmsg
(
respbuf
,
"`Connection Failed`
\n\n
"
"SyncTERM was unable to establish a connection.
\n
"
);
"SyncTERM was unable to establish a connection.
\n
"
);
conn_api
.
terminate
=-
1
;
conn_api
.
terminate
=-
1
;
return
(
-
1
);
return
(
-
1
);
}
}
uifc
.
pop
(
NULL
);
uifc
.
pop
(
respbuf
);
SLEEP
(
1000
);
uifc
.
pop
(
NULL
);
uifc
.
pop
(
NULL
);
if
(
!
create_conn_buf
(
&
conn_inbuf
,
BUFFER_SIZE
))
{
if
(
!
create_conn_buf
(
&
conn_inbuf
,
BUFFER_SIZE
))
{
...
...
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