aboutsummaryrefslogtreecommitdiff
path: root/src/transport/gnunet-transport-wlan-helper.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-01-12 09:20:14 +0000
committerChristian Grothoff <christian@grothoff.org>2011-01-12 09:20:14 +0000
commit14839ad22bf671382d464c493d82e6ee0c629c07 (patch)
tree3f237ddfea7f365b771a7229d79fd0e8437a9663 /src/transport/gnunet-transport-wlan-helper.c
parent564f7d6ca787ffaeb055cbba0f8c778a0dca037d (diff)
downloadgnunet-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.c30
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
140void 140void
141usage(void) 141usage()
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
400int first; 400static int first;
401int closeprog = 0; 401static int closeprog;
402 402
403void sigfunc(int sig) 403static void
404sigfunc(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
418struct sendbuf{ 411struct 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;