Created SILC Runtime Toolkit git repository Part II.
[runtime.git] / lib / silcutil / tests / test_silcasync.c
index 96210e08df50431c2286fb000f8070e5b5163841..7e8be9e38fde4b46e76c021cb897c428ec2cd43f 100644 (file)
@@ -1,6 +1,6 @@
 /* SilcAsyncOperation tests */
 
-#include "silc.h"
+#include "silcruntime.h"
 #include "silcfsm.h"
 #include "silcasync.h"
 
@@ -94,7 +94,7 @@ SILC_FSM_STATE(test_st_second)
 
   /** Finish */
   silc_fsm_next_later(fsm, test_st_finish, 2, 0);
-  SILC_FSM_WAIT;
+  return SILC_FSM_WAIT;
 }
 
 SILC_FSM_STATE(test_st_finish)
@@ -102,7 +102,7 @@ SILC_FSM_STATE(test_st_finish)
   SILC_LOG_DEBUG(("test_st_finish"));
 
   SILC_LOG_DEBUG(("Finish machine"));
-  SILC_FSM_FINISH;
+  return SILC_FSM_FINISH;
 }
 
 static void destructor(SilcFSM fsm, void *fsm_context,
@@ -122,11 +122,11 @@ int main(int argc, char **argv)
   if (argc > 1 && !strcmp(argv[1], "-d")) {
     silc_log_debug(TRUE);
     silc_log_debug_hexdump(TRUE);
-    silc_log_set_debug_string("*async*");
+    silc_log_set_debug_string("*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)
@@ -154,5 +154,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;
 }