gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r14154 - gnunet/src/transport


From: gnunet
Subject: [GNUnet-SVN] r14154 - gnunet/src/transport
Date: Wed, 12 Jan 2011 10:20:14 +0100

Author: grothoff
Date: 2011-01-12 10:20:14 +0100 (Wed, 12 Jan 2011)
New Revision: 14154

Modified:
   gnunet/src/transport/gnunet-transport-wlan-helper.c
Log:
fixes

Modified: gnunet/src/transport/gnunet-transport-wlan-helper.c
===================================================================
--- gnunet/src/transport/gnunet-transport-wlan-helper.c 2011-01-12 08:52:21 UTC 
(rev 14153)
+++ gnunet/src/transport/gnunet-transport-wlan-helper.c 2011-01-12 09:20:14 UTC 
(rev 14154)
@@ -138,7 +138,7 @@
 
 
 void
-usage(void)
+usage()
 {
        printf(
            "Usage: wlan-hwd [options] <interface>\n\nOptions\n"
@@ -397,25 +397,18 @@
 #define FIFO_FILE2       "/tmp/MYFIFOout"
 #define MAXLINE         20
 
-int first;
-int closeprog = 0;
+static int first;
+static int closeprog;
 
-void sigfunc(int sig)
+static void 
+sigfunc(int sig)
 {
-
- if(sig != SIGINT || sig != SIGTERM || sig != SIGKILL)
-   return;
- else
-    {
-      closeprog = 1;
-
-      unlink(FIFO_FILE1);
-      unlink(FIFO_FILE2);
-
-    }
+  closeprog = 1;  
+  unlink(FIFO_FILE1);
+  unlink(FIFO_FILE2);
 }
 
-struct sendbuf{
+struct sendbuf {
   int pos;
   int size;
   char buf[MAXLINE * 2];
@@ -517,9 +510,8 @@
   fdpin = fileno(fpin);
   fdpout = fileno(fpout);
 
-  signal(SIGINT, sigfunc);
-  signal(SIGTERM, sigfunc);
-  signal(SIGKILL, sigfunc);
+  signal(SIGINT, &sigfunc);
+  signal(SIGTERM, &sigfunc);
 
   char readbuf[MAXLINE];
   int readsize = 0;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]