+ /* Activate the protocol for this socket if necessary */
+ if ((type == SILC_SERVER_BACKUP_RESUMED ||
+ type == SILC_SERVER_BACKUP_RESUMED_GLOBAL) &&
+ sock->type == SILC_SOCKET_TYPE_ROUTER && !sock->protocol &&
+ ((SilcIDListData)sock->user_data)->status &
+ SILC_IDLIST_STATUS_DISABLED) {
+ SilcServerEntry backup_router;
+
+ if (silc_server_backup_replaced_get(server,
+ ((SilcServerEntry)sock->
+ user_data)->id,
+ &backup_router)) {
+ SilcSocketConnection bsock =
+ (SilcSocketConnection)backup_router->connection;
+ if (bsock->protocol && bsock->protocol->protocol &&
+ bsock->protocol->protocol->type == SILC_PROTOCOL_SERVER_BACKUP) {
+ sock->protocol = bsock->protocol;
+ ctx = sock->protocol->context;
+ ctx->sock = sock;
+ }
+ }
+ }
+