summaryrefslogtreecommitdiff
path: root/flexd.c
diff options
context:
space:
mode:
authorDave Hibberd <dave.hibberd@gmail.com>2015-11-22 14:56:30 +0000
committerDave Hibberd <dave.hibberd@gmail.com>2015-11-22 14:56:30 +0000
commit0ed015b5b0e1fe85f86ed3f8a145c2d94ef4aa05 (patch)
treeb44bb03f827668885be243da82d008ddacbdf51b /flexd.c
parent4013fe89dba7bcbd25ffded96d12bba6c9c78476 (diff)
Imported Upstream version 2.4
Diffstat (limited to 'flexd.c')
-rw-r--r--flexd.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/flexd.c b/flexd.c
index b82e5bd..663307a 100644
--- a/flexd.c
+++ b/flexd.c
@@ -117,7 +117,7 @@ void read_conf(void)
int download_dest(char *gateway, char *fname)
{
FILE *tmp;
- char buffer[1024], port[14], path[AX25_MAX_DIGIS*10];
+ char buffer[256], port[14], path[AX25_MAX_DIGIS*10];
char *addr, *commands[10], *dlist[9]; /* Destination + 8 digipeaters */
fd_set read_fd;
int n, addrlen, cmd_send=0, cmd_ack=0, c, k;
@@ -390,6 +390,7 @@ void quit_handler(int sig)
signal(SIGTERM, sigterm_defhnd);
raise(SIGTERM);
+ return;
}
int main(int argc, char *argv[])
@@ -410,7 +411,7 @@ int main(int argc, char *argv[])
return 1;
}
- signal(SIGTERM, quit_handler);
+// signal(SIGTERM, quit_handler);
pidfile = fopen(FLEXD_PID_FILE, "w");
fprintf(pidfile, "%d\n", (int)getpid());
fclose(pidfile);
@@ -420,8 +421,8 @@ int main(int argc, char *argv[])
signal(SIGHUP, hup_handler);
signal(SIGALRM, alarm_handler);
sigterm_defhnd = signal(SIGTERM, quit_handler);
- if (sigterm_defhnd == SIG_ERR)
- sigterm_defhnd = SIG_DFL;
+// if (sigterm_defhnd == SIG_ERR)
+// sigterm_defhnd = SIG_DFL;
alarm(poll_time);
for(;;) pause();