Added SILC Thread Queue API
[crypto.git] / lib / silcserver / server_st_command.c
index 62779e084b0eda67b257eff212676e1039c7b302..48e49e8dac1e86a97e1c3fb67e07b102d6524314 100644 (file)
@@ -225,7 +225,7 @@ SilcServerPending silc_server_command_pending(SilcServerThread thread,
     return NULL;
   }
 
-  silc_fsm_sema_init(&pending->wait_reply, &thread->fsm, 0);
+  silc_fsm_event_init(&pending->wait_reply, &thread->fsm, 0);
   pending->refcnt = 1;
   pending->cmd_ident = cmd_ident;
 
@@ -298,7 +298,7 @@ void silc_server_command_pending_signal(SilcServerCommand cmd)
 
   /* Signal */
   pending->reply = cmd;
-  SILC_FSM_SEMA_POST(&pending->wait_reply);
+  SILC_FSM_EVENT_SIGNAL(&pending->wait_reply);
 
   /* Remove from pending */
   silc_hash_table_del_by_context(thread->server->pending_commands,
@@ -513,7 +513,7 @@ SILC_FSM_STATE(silc_server_st_packet_command)
   /* Statistics */
   thread->server->stat.commands_received++;
 
-  return timeout ? SILC_FSM_WAIT : SILC_FSM_CONTINUE;
+  return timeout ? SILC_FSM_WAIT : return SILC_FSM_CONTINUE;
 }
 
 /********************************* WHOIS ************************************/