fixed bus args copy on non i386 archs
authorMartin Willi <martin@strongswan.org>
Mon, 21 Jul 2008 14:23:43 +0000 (14:23 -0000)
committerMartin Willi <martin@strongswan.org>
Mon, 21 Jul 2008 14:23:43 +0000 (14:23 -0000)
src/charon/bus/bus.c

index 1f51045..c080387 100644 (file)
@@ -284,13 +284,16 @@ typedef struct {
  */
 static bool signal_cb(entry_t *entry, signal_data_t *data)
 {
+       va_list args;
+
        if (entry->calling)
        {       /* avoid recursive calls */
                return FALSE;
        }
        entry->calling = TRUE;
+       va_copy(args, data->args);
        if (!entry->listener->signal(entry->listener, data->signal, data->level,
-                       data->thread, data->ike_sa, data->user, data->format, data->args))
+                                       data->thread, data->ike_sa, data->user, data->format, args))
        {
                if (entry->blocker)
                {
@@ -301,9 +304,11 @@ static bool signal_cb(entry_t *entry, signal_data_t *data)
                {
                        entry_destroy(entry);
                }
+               va_end(args);
                entry->calling = FALSE;
                return TRUE;
        }
+       va_end(args);
        entry->calling = FALSE;
        return FALSE;
 }