diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-01-12 09:20:14 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-01-12 09:20:14 +0000 |
commit | 14839ad22bf671382d464c493d82e6ee0c629c07 (patch) | |
tree | 3f237ddfea7f365b771a7229d79fd0e8437a9663 /src/transport/gnunet-transport-wlan-helper.c | |
parent | 564f7d6ca787ffaeb055cbba0f8c778a0dca037d (diff) | |
download | gnunet-14839ad22bf671382d464c493d82e6ee0c629c07.tar.gz gnunet-14839ad22bf671382d464c493d82e6ee0c629c07.zip |
fixes
Diffstat (limited to 'src/transport/gnunet-transport-wlan-helper.c')
-rw-r--r-- | src/transport/gnunet-transport-wlan-helper.c | 30 |
1 files changed, 11 insertions, 19 deletions
diff --git a/src/transport/gnunet-transport-wlan-helper.c b/src/transport/gnunet-transport-wlan-helper.c index feb30deb6..7ac2915b4 100644 --- a/src/transport/gnunet-transport-wlan-helper.c +++ b/src/transport/gnunet-transport-wlan-helper.c | |||
@@ -138,7 +138,7 @@ Dump(u8 * pu8, int nLength) | |||
138 | 138 | ||
139 | 139 | ||
140 | void | 140 | void |
141 | usage(void) | 141 | usage() |
142 | { | 142 | { |
143 | printf( | 143 | printf( |
144 | "Usage: wlan-hwd [options] <interface>\n\nOptions\n" | 144 | "Usage: wlan-hwd [options] <interface>\n\nOptions\n" |
@@ -397,25 +397,18 @@ int ieee80211_radiotap_iterator_next( | |||
397 | #define FIFO_FILE2 "/tmp/MYFIFOout" | 397 | #define FIFO_FILE2 "/tmp/MYFIFOout" |
398 | #define MAXLINE 20 | 398 | #define MAXLINE 20 |
399 | 399 | ||
400 | int first; | 400 | static int first; |
401 | int closeprog = 0; | 401 | static int closeprog; |
402 | 402 | ||
403 | void sigfunc(int sig) | 403 | static void |
404 | sigfunc(int sig) | ||
404 | { | 405 | { |
405 | 406 | closeprog = 1; | |
406 | if(sig != SIGINT || sig != SIGTERM || sig != SIGKILL) | 407 | unlink(FIFO_FILE1); |
407 | return; | 408 | unlink(FIFO_FILE2); |
408 | else | ||
409 | { | ||
410 | closeprog = 1; | ||
411 | |||
412 | unlink(FIFO_FILE1); | ||
413 | unlink(FIFO_FILE2); | ||
414 | |||
415 | } | ||
416 | } | 409 | } |
417 | 410 | ||
418 | struct sendbuf{ | 411 | struct sendbuf { |
419 | int pos; | 412 | int pos; |
420 | int size; | 413 | int size; |
421 | char buf[MAXLINE * 2]; | 414 | char buf[MAXLINE * 2]; |
@@ -517,9 +510,8 @@ testmode(int argc, char *argv[]) | |||
517 | fdpin = fileno(fpin); | 510 | fdpin = fileno(fpin); |
518 | fdpout = fileno(fpout); | 511 | fdpout = fileno(fpout); |
519 | 512 | ||
520 | signal(SIGINT, sigfunc); | 513 | signal(SIGINT, &sigfunc); |
521 | signal(SIGTERM, sigfunc); | 514 | signal(SIGTERM, &sigfunc); |
522 | signal(SIGKILL, sigfunc); | ||
523 | 515 | ||
524 | char readbuf[MAXLINE]; | 516 | char readbuf[MAXLINE]; |
525 | int readsize = 0; | 517 | int readsize = 0; |