Revision: 474
          http://vde.svn.sourceforge.net/vde/?rev=474&view=rev
Author:   rd235
Date:     2011-02-14 17:54:56 +0000 (Mon, 14 Feb 2011)

Log Message:
-----------
bugfix: sigmask not initialized in qtimer (tnx megurikuru)

Modified Paths:
--------------
    trunk/vde-2/src/vde_switch/qtimer.c

Modified: trunk/vde-2/src/vde_switch/qtimer.c
===================================================================
--- trunk/vde-2/src/vde_switch/qtimer.c 2011-02-14 15:37:56 UTC (rev 473)
+++ trunk/vde-2/src/vde_switch/qtimer.c 2011-02-14 17:54:56 UTC (rev 474)
@@ -89,7 +89,7 @@
                qth[n]->qt_arg=arg;
                qth[n]->qt_times=(times==0)?-1:times;
                qtime_csexit();
-    return qth[n]->qt_n;
+               return qth[n]->qt_n;
        } else
                return -1;
 }
@@ -139,15 +139,17 @@
        struct itimerval it;
        struct sigaction sa;
 
-  sa.sa_handler = sig_alarm;
-  sa.sa_flags = SA_RESTART;
-  if(sigaction(SIGALRM, &sa, NULL) < 0){
+       sa.sa_handler = sig_alarm;
+       sa.sa_flags = SA_RESTART;
+       sigemptyset(&sa.sa_mask);
+
+       if(sigaction(SIGALRM, &sa, NULL) < 0){
          printlog(LOG_WARNING,"Setting handler for SIGALRM %s", 
strerror(errno));
            return;
-  }
- 
+       }
+
        sigemptyset(&ss_alarm);
-       sigaddset(&ss_alarm,SIGALRM);
+       sigaddset(&ss_alarm, SIGALRM);
 
        it.it_value.tv_sec = 1;
        it.it_value.tv_usec = 0 ;


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
vde-users mailing list
vde-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vde-users

Reply via email to