X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=apps%2Fsilcd%2Fserver_backup.c;h=5888909c6a1a63d3716a345c9d98d22f82a2b8d7;hb=a818c5b5411bbc4436d1c5f011236985c96bb787;hp=6b3d876a8e74999f6cf0c7be9696d10614773128;hpb=d47a87b03b846e2333ef57b2c0d81f1644992964;p=silc.git diff --git a/apps/silcd/server_backup.c b/apps/silcd/server_backup.c index 6b3d876a..5888909c 100644 --- a/apps/silcd/server_backup.c +++ b/apps/silcd/server_backup.c @@ -27,7 +27,7 @@ SILC_TASK_CALLBACK(silc_server_protocol_backup_done); typedef struct { SilcServerEntry server; SilcIDIP ip; - uint16 port; + SilcUInt16 port; bool local; } SilcServerBackupEntry; @@ -35,20 +35,20 @@ typedef struct { by backup router. */ typedef struct { SilcIDIP ip; - uint16 port; + SilcUInt16 port; SilcServerEntry server; /* Backup router that replaced the primary */ } SilcServerBackupReplaced; /* Backup context */ struct SilcServerBackupStruct { SilcServerBackupEntry *servers; - uint32 servers_count; + SilcUInt32 servers_count; SilcServerBackupReplaced **replaced; - uint32 replaced_count; + SilcUInt32 replaced_count; }; typedef struct { - uint8 session; + SilcUInt8 session; bool connected; SilcServerEntry server_entry; } SilcServerBackupProtocolSession; @@ -58,10 +58,10 @@ typedef struct { SilcServer server; SilcSocketConnection sock; bool responder; - uint8 type; - uint8 session; + SilcUInt8 type; + SilcUInt8 session; SilcServerBackupProtocolSession *sessions; - uint32 sessions_count; + SilcUInt32 sessions_count; long start; } *SilcServerBackupProtocolContext; @@ -319,7 +319,7 @@ void silc_server_backup_send(SilcServer server, SilcPacketType type, SilcPacketFlags flags, unsigned char *data, - uint32 data_len, + SilcUInt32 data_len, bool force_send, bool local) { @@ -361,7 +361,7 @@ void silc_server_backup_send_dest(SilcServer server, void *dst_id, SilcIdType dst_id_type, unsigned char *data, - uint32 data_len, + SilcUInt32 data_len, bool force_send, bool local) { @@ -400,7 +400,7 @@ void silc_server_backup_resume_router(SilcServer server, SilcSocketConnection sock, SilcPacketContext *packet) { - uint8 type, session; + SilcUInt8 type, session; SilcServerBackupProtocolContext ctx; int i, ret; @@ -544,7 +544,7 @@ SILC_TASK_CALLBACK(silc_server_backup_connect_to_router) connection is created. */ void silc_server_backup_reconnect(SilcServer server, - const char *ip, uint16 port, + const char *ip, SilcUInt16 port, SilcServerConnectRouterCallback callback, void *context) { @@ -682,7 +682,7 @@ SILC_TASK_CALLBACK(silc_server_backup_send_resumed) SILC_PACKET_RESUME_ROUTER: - + = the protocol opcode = Identifier for this packet and any subsequent reply @@ -867,7 +867,7 @@ SILC_TASK_CALLBACK_GLOBAL(silc_server_protocol_backup) protocol->state++; } else { /* Responder of the protocol. */ - SilcServerConfigSectionRouter *primary; + SilcServerConfigRouter *primary; /* We should have received START or START_GLOBAL packet */ if (ctx->type != SILC_SERVER_BACKUP_START && @@ -882,7 +882,7 @@ SILC_TASK_CALLBACK_GLOBAL(silc_server_protocol_backup) /* Connect to the primary router that was down that is now supposed to be back online. We send the CONNECTED packet after we've established the connection to the primary router. */ - primary = silc_server_config_get_primary_router(server->config); + primary = silc_server_config_get_primary_router(server); if (primary && server->backup_primary) { silc_server_backup_reconnect(server, primary->host, primary->port, @@ -975,7 +975,7 @@ SILC_TASK_CALLBACK_GLOBAL(silc_server_protocol_backup) to next state. */ if (server->router && !(server->router->data.status & SILC_IDLIST_STATUS_DISABLED) && - silc_server_config_is_primary_route(server->config)) { + silc_server_config_is_primary_route(server)) { /* We'll wait for RESUMED packet */ protocol->state = SILC_PROTOCOL_STATE_END; break;