Added SILC Thread Queue API
[crypto.git] / lib / silcserver / server_st_query.c
index c940ba04a4455830ff05b01ca8b5f1980ddda8a7..6ee135e9e8be4070308d16c5e9ffaba759ba1833 100644 (file)
@@ -55,7 +55,7 @@ typedef struct {
   SilcUInt32 ids_count;                    /* number of queried IDs */
   SilcUInt32 reply_count;          /* Requested reply count */
   SilcDList attrs;                 /* Requested Attributes in WHOIS */
-  SilcFSMSemaStruct wait_resolve;   /* Resolving signaller */
+  SilcFSMEventStruct wait_resolve;   /* Resolving signaller */
 
   /* Query session data */
   SilcServerComman cmd;                    /* Command context for query */
@@ -252,7 +252,7 @@ SILC_FSM_STATE(silc_server_st_query_router_reply)
   SilcBool timedout;
 
   /* Wait here for the reply */
-  SILC_FSM_SEMA_TIMEDWAIT(&pending->wait_reply, 10, 0, &timedout);
+  SILC_FSM_EVENT_TIMEDWAIT(&pending->wait_reply, 10, 0, &timedout);
 
   if (timedout) {
     /** Timeout waiting reply */
@@ -1032,7 +1032,7 @@ SILC_FSM_STATE(silc_server_st_query_wait_resolve)
   SilcBool timedout;
 
   /* Wait here for the reply */
-  SILC_FSM_SEMA_TIMEDWAIT(&res->pending->wait_reply,
+  SILC_FSM_EVENT_TIMEDWAIT(&res->pending->wait_reply,
                          res->local ? 3 : 10, 0, &timedout);
 
 
@@ -1042,7 +1042,7 @@ SILC_FSM_STATE(silc_server_st_query_wait_resolve)
   silc_free(res);
 
   /* Signal main thread that reply was received */
-  SILC_FSM_SEMA_POST(&query->wait_resolve);
+  SILC_FSM_EVENT_SIGNAL(&query->wait_resolve);
 
   return SILC_FSM_FINISH;
 }
@@ -1057,7 +1057,7 @@ SILC_FSM_STATE(silc_server_st_query_resolved)
   SilcServerCommand cmd = query->cmd;
 
   /* Wait here until all resolvings has arrived */
-  SILC_FSM_SEMA_WAIT(&query->wait_resolve);
+  SILC_FSM_EVENT_WAIT(&query->wait_resolve);
   if (silc_list_count(query->resolvings) > 0)
     return SILC_FSM_CONTINUE;