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
c9ebbe5a
Commit
c9ebbe5a
authored
20 years ago
by
deuce
Browse files
Options
Downloads
Patches
Plain Diff
Switch back to rcvtimeo based timeouts but have option to make
type a preference (when prefereces are implemented)
parent
d4f6f810
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/syncterm/rlogin.c
+18
-4
18 additions, 4 deletions
src/syncterm/rlogin.c
src/syncterm/rlogin.h
+1
-0
1 addition, 0 deletions
src/syncterm/rlogin.h
src/syncterm/term.c
+3
-1
3 additions, 1 deletion
src/syncterm/term.c
with
22 additions
and
5 deletions
src/syncterm/rlogin.c
+
18
−
4
View file @
c9ebbe5a
...
...
@@ -5,6 +5,8 @@
static
SOCKET
rlogin_socket
=
INVALID_SOCKET
;
int
rcvtimeo
=
1
;
int
rlogin_recv
(
char
*
buffer
,
size_t
buflen
)
{
int
r
;
...
...
@@ -51,7 +53,6 @@ int rlogin_connect(char *addr, int port, char *ruser, char *passwd, int bedumb)
char
nil
=
0
;
char
*
p
;
unsigned
int
neta
;
unsigned
long
l
;
for
(
p
=
addr
;
*
p
;
p
++
)
if
(
*
p
!=
'.'
&&
!
isdigit
(
*
p
))
...
...
@@ -93,9 +94,22 @@ int rlogin_connect(char *addr, int port, char *ruser, char *passwd, int bedumb)
return
(
-
1
);
}
l
=
1
;
ioctlsocket
(
rlogin_socket
,
FIONBIO
,
&
l
);
/* fcntl(rlogin_socket, F_SETFL, fcntl(rlogin_socket, F_GETFL)|O_NONBLOCK); */
if
(
rcvtimeo
)
{
#ifdef _WIN32
int
tv
=
10
;
#else
struct
timeval
tv
;
tv
.
tv_sec
=
0
;
tv
.
tv_usec
=
10000
;
#endif
setsockopt
(
rlogin_socket
,
SOL_SOCKET
,
SO_RCVTIMEO
,
&
tv
,
sizeof
(
tv
));
}
else
{
unsigned
long
l
=
1
;
ioctlsocket
(
rlogin_socket
,
FIONBIO
,
&
l
);
}
if
(
!
bedumb
)
{
rlogin_send
(
""
,
1
,
1000
);
...
...
This diff is collapsed.
Click to expand it.
src/syncterm/rlogin.h
+
1
−
0
View file @
c9ebbe5a
...
...
@@ -4,6 +4,7 @@
#include
<sockwrap.h>
extern
SOCKET
rlogin_socket
;
extern
int
rcvtimeo
;
int
rlogin_recv
(
char
*
buffer
,
size_t
buflen
);
int
rlogin_send
(
char
*
buffer
,
size_t
buflen
,
unsigned
int
timeout
);
...
...
This diff is collapsed.
Click to expand it.
src/syncterm/term.c
+
3
−
1
View file @
c9ebbe5a
...
...
@@ -2,6 +2,7 @@
#include
<ciolib.h>
#include
<keys.h>
#include
"rlogin.h"
#include
"term.h"
#include
"uifcinit.h"
#include
"menu.h"
...
...
@@ -117,6 +118,7 @@ void doterm(void)
}
}
SLEEP
(
1
);
if
(
!
rcvtimeo
)
SLEEP
(
1
);
}
}
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