Created SILC Runtime Toolkit git repository Part II.
[runtime.git] / lib / silcutil / tests / test_silcfsm.c
index f041630f1cfe16426ef353723e9fb800f0a07481..8cfda2dcc570c44df26fb5fff872a4fe024c8534 100644 (file)
@@ -1,6 +1,6 @@
 /* SILC FSM tests */
 
-#include "silc.h"
+#include "silcruntime.h"
 #include "silcfsm.h"
 
 typedef void (*Callback)(void *context);
@@ -212,7 +212,7 @@ SILC_FSM_STATE(test_st_signal1)
 
   SILC_LOG_DEBUG(("Signaller 1"));
   SILC_FSM_EVENT_SIGNAL(&f->wait2);
-  silc_fsm_next_later(fsm, test_st_signal1_check, 0, 500000); 
+  silc_fsm_next_later(fsm, test_st_signal1_check, 0, 500000);
   return SILC_FSM_WAIT;;
 }
 
@@ -450,11 +450,11 @@ int main(int argc, char **argv)
     silc_log_debug(TRUE);
     silc_log_debug_hexdump(TRUE);
     silc_log_quick(TRUE);
-    silc_log_set_debug_string("*fsm*,*async*");
+    silc_log_set_debug_string("*fsm*,*async*,*errno*");
   }
 
   SILC_LOG_DEBUG(("Allocating scheduler"));
-  schedule = silc_schedule_init(0, NULL);
+  schedule = silc_schedule_init(0, NULL, NULL, NULL);
 
   f = silc_calloc(1, sizeof(*f));
   if (!f)
@@ -482,5 +482,5 @@ int main(int argc, char **argv)
   SILC_LOG_DEBUG(("Testing was %s", success ? "SUCCESS" : "FAILURE"));
   fprintf(stderr, "Testing was %s\n", success ? "SUCCESS" : "FAILURE");
 
-  return success;
+  return !success;
 }