SILC FSM API changes.
[silc.git] / lib / silcserver / server_st_command.c
index 62779e084b0eda67b257eff212676e1039c7b302..39baac420d1ba47a18fc03ba612be7c0ac4e943b 100644 (file)
@@ -37,7 +37,7 @@ do {                                                                  \
                                     SILC_STATUS_ERR_NOT_ENOUGH_PARAMS, \
                                     0);                                \
     silc_server_command_free(cmd);                                     \
-    return SILC_FSM_FINISH;                                            \
+    SILC_FSM_FINISH;                                           \
   }                                                                    \
   if (_argc > max) {                                                   \
     SILC_LOG_DEBUG(("Too many parameters in command"));                        \
@@ -46,7 +46,7 @@ do {                                                                  \
                                     SILC_STATUS_ERR_TOO_MANY_PARAMS,   \
                                     0);                                \
     silc_server_command_free(cmd);                                     \
-    return SILC_FSM_FINISH;                                            \
+    SILC_FSM_FINISH;                                           \
   }                                                                    \
 } while(0)
 
@@ -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,
@@ -325,7 +325,7 @@ SILC_FSM_STATE(silc_server_st_packet_command)
   cmd = silc_server_command_alloc(thread);
   if (!cmd) {
     silc_packet_free(packet);
-    return SILC_FSM_FINISH;
+    SILC_FSM_FINISH;
   }
 
   cmd->packet = packet;
@@ -336,7 +336,7 @@ SILC_FSM_STATE(silc_server_st_packet_command)
   if (!cmd->payload) {
     SILC_LOG_ERROR(("Bad command payload"));
     silc_server_command_free(cmd);
-    return SILC_FSM_FINISH;
+    SILC_FSM_FINISH;
   }
 
   /* If client executes commands more frequently than once in 2 seconds,
@@ -506,7 +506,7 @@ SILC_FSM_STATE(silc_server_st_packet_command)
   default:
     SILC_LOG_DEBUG(("Unknown command %d", silc_command_get(cmd->payload)));
     silc_server_command_free(cmd);
-    return SILC_FSM_FINISH;
+    SILC_FSM_FINISH;
     break;
   }
 
@@ -528,7 +528,7 @@ SILC_FSM_STATE(silc_server_st_command_whois)
   /** WHOIS query */
   silc_fsm_next(fsm, silc_server_st_query_whois);
 
-  return SILC_FSM_CONTINUE;
+  SILC_FSM_CONTINUE;
 }
 
 
@@ -544,7 +544,7 @@ SILC_FSM_STATE(silc_server_st_command_whowas)
   /** WHOWAS query */
   silc_fsm_next(fsm, silc_server_st_query_whowas);
 
-  return SILC_FSM_CONTINUE;
+  SILC_FSM_CONTINUE;
 }
 
 
@@ -560,7 +560,7 @@ SILC_FSM_STATE(silc_server_st_command_identify)
   /** IDENTIFY query */
   silc_fsm_next(fsm, silc_server_st_query_identify);
 
-  return SILC_FSM_CONTINUE;
+  SILC_FSM_CONTINUE;
 }
 
 
@@ -664,7 +664,7 @@ SILC_FSM_STATE(silc_server_st_command_nick)
 
  out:
   silc_server_command_free(cmd);
-  return SILC_FSM_FINISH;
+  SILC_FSM_FINISH;
 }
 
 
@@ -676,7 +676,7 @@ SILC_FSM_STATE(silc_server_st_command_list)
   SilcServerCommand cmd = state_context;
   SilcArgumentPayload args = silc_command_get_args(cmd->payload);
 
-  return SILC_FSM_FINISH;
+  SILC_FSM_FINISH;
 }
 
 
@@ -688,7 +688,7 @@ SILC_FSM_STATE(silc_server_st_command_topic)
   SilcServerCommand cmd = state_context;
   SilcArgumentPayload args = silc_command_get_args(cmd->payload);
 
-  return SILC_FSM_FINISH;
+  SILC_FSM_FINISH;
 }
 
 
@@ -700,7 +700,7 @@ SILC_FSM_STATE(silc_server_st_command_invite)
   SilcServerCommand cmd = state_context;
   SilcArgumentPayload args = silc_command_get_args(cmd->payload);
 
-  return SILC_FSM_FINISH;
+  SILC_FSM_FINISH;
 }
 
 
@@ -712,7 +712,7 @@ SILC_FSM_STATE(silc_server_st_command_quit)
   SilcServerCommand cmd = state_context;
   SilcArgumentPayload args = silc_command_get_args(cmd->payload);
 
-  return SILC_FSM_FINISH;
+  SILC_FSM_FINISH;
 }
 
 
@@ -724,7 +724,7 @@ SILC_FSM_STATE(silc_server_st_command_kill)
   SilcServerCommand cmd = state_context;
   SilcArgumentPayload args = silc_command_get_args(cmd->payload);
 
-  return SILC_FSM_FINISH;
+  SILC_FSM_FINISH;
 }
 
 
@@ -732,7 +732,7 @@ SILC_FSM_STATE(silc_server_st_command_kill)
 
 SILC_FSM_STATE(silc_server_st_command_info)
 {
-  return SILC_FSM_FINISH;
+  SILC_FSM_FINISH;
 }
 
 
@@ -744,7 +744,7 @@ SILC_FSM_STATE(silc_server_st_command_stats)
   SilcServerCommand cmd = state_context;
   SilcArgumentPayload args = silc_command_get_args(cmd->payload);
 
-  return SILC_FSM_FINISH;
+  SILC_FSM_FINISH;
 }
 
 
@@ -789,7 +789,7 @@ SILC_FSM_STATE(silc_server_st_command_ping)
 
  out:
   silc_server_command_free(cmd);
-  return SILC_FSM_FINISH;
+  SILC_FSM_FINISH;
 }
 
 
@@ -801,7 +801,7 @@ SILC_FSM_STATE(silc_server_st_command_oper)
   SilcServerCommand cmd = state_context;
   SilcArgumentPayload args = silc_command_get_args(cmd->payload);
 
-  return SILC_FSM_FINISH;
+  SILC_FSM_FINISH;
 }
 
 
@@ -813,7 +813,7 @@ SILC_FSM_STATE(silc_server_st_command_join)
   SilcServerCommand cmd = state_context;
   SilcArgumentPayload args = silc_command_get_args(cmd->payload);
 
-  return SILC_FSM_FINISH;
+  SILC_FSM_FINISH;
 }
 
 
@@ -825,7 +825,7 @@ SILC_FSM_STATE(silc_server_st_command_motd)
   SilcServerCommand cmd = state_context;
   SilcArgumentPayload args = silc_command_get_args(cmd->payload);
 
-  return SILC_FSM_FINISH;
+  SILC_FSM_FINISH;
 }
 
 
@@ -837,7 +837,7 @@ SILC_FSM_STATE(silc_server_st_command_umode)
   SilcServerCommand cmd = state_context;
   SilcArgumentPayload args = silc_command_get_args(cmd->payload);
 
-  return SILC_FSM_FINISH;
+  SILC_FSM_FINISH;
 }
 
 
@@ -849,7 +849,7 @@ SILC_FSM_STATE(silc_server_st_command_cmode)
   SilcServerCommand cmd = state_context;
   SilcArgumentPayload args = silc_command_get_args(cmd->payload);
 
-  return SILC_FSM_FINISH;
+  SILC_FSM_FINISH;
 }
 
 
@@ -861,7 +861,7 @@ SILC_FSM_STATE(silc_server_st_command_cumode)
   SilcServerCommand cmd = state_context;
   SilcArgumentPayload args = silc_command_get_args(cmd->payload);
 
-  return SILC_FSM_FINISH;
+  SILC_FSM_FINISH;
 }
 
 
@@ -873,7 +873,7 @@ SILC_FSM_STATE(silc_server_st_command_kick)
   SilcServerCommand cmd = state_context;
   SilcArgumentPayload args = silc_command_get_args(cmd->payload);
 
-  return SILC_FSM_FINISH;
+  SILC_FSM_FINISH;
 }
 
 
@@ -885,7 +885,7 @@ SILC_FSM_STATE(silc_server_st_command_ban)
   SilcServerCommand cmd = state_context;
   SilcArgumentPayload args = silc_command_get_args(cmd->payload);
 
-  return SILC_FSM_FINISH;
+  SILC_FSM_FINISH;
 }
 
 
@@ -897,7 +897,7 @@ SILC_FSM_STATE(silc_server_st_command_detach)
   SilcServerCommand cmd = state_context;
   SilcArgumentPayload args = silc_command_get_args(cmd->payload);
 
-  return SILC_FSM_FINISH;
+  SILC_FSM_FINISH;
 }
 
 
@@ -909,7 +909,7 @@ SILC_FSM_STATE(silc_server_st_command_watch)
   SilcServerCommand cmd = state_context;
   SilcArgumentPayload args = silc_command_get_args(cmd->payload);
 
-  return SILC_FSM_FINISH;
+  SILC_FSM_FINISH;
 }
 
 
@@ -921,7 +921,7 @@ SILC_FSM_STATE(silc_server_st_command_silcoper)
   SilcServerCommand cmd = state_context;
   SilcArgumentPayload args = silc_command_get_args(cmd->payload);
 
-  return SILC_FSM_FINISH;
+  SILC_FSM_FINISH;
 }
 
 
@@ -933,7 +933,7 @@ SILC_FSM_STATE(silc_server_st_command_leave)
   SilcServerCommand cmd = state_context;
   SilcArgumentPayload args = silc_command_get_args(cmd->payload);
 
-  return SILC_FSM_FINISH;
+  SILC_FSM_FINISH;
 }
 
 
@@ -945,7 +945,7 @@ SILC_FSM_STATE(silc_server_st_command_users)
   SilcServerCommand cmd = state_context;
   SilcArgumentPayload args = silc_command_get_args(cmd->payload);
 
-  return SILC_FSM_FINISH;
+  SILC_FSM_FINISH;
 }
 
 
@@ -957,7 +957,7 @@ SILC_FSM_STATE(silc_server_st_command_getkey)
   SilcServerCommand cmd = state_context;
   SilcArgumentPayload args = silc_command_get_args(cmd->payload);
 
-  return SILC_FSM_FINISH;
+  SILC_FSM_FINISH;
 }
 
 
@@ -969,5 +969,5 @@ SILC_FSM_STATE(silc_server_st_command_service)
   SilcServerCommand cmd = state_context;
   SilcArgumentPayload args = silc_command_get_args(cmd->payload);
 
-  return SILC_FSM_FINISH;
+  SILC_FSM_FINISH;
 }