projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
*** empty log message ***
[spider.git]
/
src
/
client.c
diff --git
a/src/client.c
b/src/client.c
index 98f5a668f96e62c17a5537b106fc62d372ade3e1..1473682a4acaf8f2cfea3d145b16220735a95396 100644
(file)
--- a/
src/client.c
+++ b/
src/client.c
@@
-90,6
+90,8
@@
char *root = "/spider"; /* root of data tree, can be overridden by DXSPI
int timeout = 60; /* default timeout for logins and things */
int paclen = DEFPACLEN; /* default buffer size for outgoing packets */
int tabsize = 8; /* default tabsize for text messages */
int timeout = 60; /* default timeout for logins and things */
int paclen = DEFPACLEN; /* default buffer size for outgoing packets */
int tabsize = 8; /* default tabsize for text messages */
+char *connsort = "local"; /* the connection variety */
+
myregex_t iscallreg[] = { /* regexes to determine whether this is a reasonable callsign */
{
myregex_t iscallreg[] = { /* regexes to determine whether this is a reasonable callsign */
{
@@
-289,7
+291,7
@@
int fcb_handler(sel_t *sp, int in, int out, int err)
unsigned char c;
/* input modes */
unsigned char c;
/* input modes */
- if (in) {
+ if (
ending == 0 &&
in) {
char *p, buf[MAXBUFL];
int r;
char *p, buf[MAXBUFL];
int r;
@@
-507,11
+509,11
@@
lend:;
*/
void setmode(char *m)
{
*/
void setmode(char *m)
{
- c
har *c
onnsort = strlower(m);
- if (eq(connsort, "telnet") || eq(connsort, "local") || eq(connsort, "nlonly") {
+ connsort = strlower(m);
+ if (eq(connsort, "telnet") || eq(connsort, "local") || eq(connsort, "nlonly")
)
{
nl = '\n';
echo = 1;
nl = '\n';
echo = 1;
- mode = eq(connsort, "nlonly") 2 : 1;
+ mode = eq(connsort, "nlonly")
?
2 : 1;
} else if (eq(connsort, "ax25")) {
nl = '\r';
echo = 0;
} else if (eq(connsort, "ax25")) {
nl = '\r';
echo = 0;
@@
-577,7
+579,7
@@
lerr:
}
/* this is kludgy, but hey so is the rest of this! */
}
/* this is kludgy, but hey so is the rest of this! */
- if (
!eq(connsort, "ax25")
&& paclen == DEFPACLEN) {
+ if (
mode != 0
&& paclen == DEFPACLEN) {
paclen = MAXPACLEN;
}
}
paclen = MAXPACLEN;
}
}
@@
-770,8
+772,6
@@
main(int argc, char *argv[])
/* is this a login? */
if (eq(call, "LOGIN") || eq(call, "login")) {
/* is this a login? */
if (eq(call, "LOGIN") || eq(call, "login")) {
- chgstate(LOGIN);
- } else if (eq(
char buf[MAXPACLEN+1];
char callsign[MAXCALLSIGN+1];
char buf[MAXPACLEN+1];
char callsign[MAXCALLSIGN+1];
@@
-850,9
+850,9
@@
lgotcall:
send_msg(node, 'A', connsort, strlen(connsort));
/* main processing loop */
send_msg(node, 'A', connsort, strlen(connsort));
/* main processing loop */
- while (
!ending
) {
+ while (
ending == 0
) {
sel_run();
sel_run();
- if (
!ending
) {
+ if (
ending == 0
) {
process_stdin();
process_node();
}
process_stdin();
process_node();
}