-/* Checks for pending commands */
-#define SILC_CLIENT_COMMAND_CHECK_PENDING(ctx) \
-do { \
- if (silc_command_pending) { \
- SilcClientCommandPending *r; \
- SilcCommand cmd; \
- \
- cmd = silc_command_get(payload); \
- for (r = silc_command_pending; r; r = r->next) { \
- if (r->reply_cmd == cmd) { \
- ctx->context = r->context; \
- ctx->callback = r->callback; \
- break; \
- } \
- } \
- } \
-} while(0)
-
-/* Executed pending command */
-#define SILC_CLIENT_COMMAND_EXEC_PENDING(ctx, cmd) \
-do { \
- if (ctx->callback) { \
- (*ctx->callback)(ctx->context); \
- silc_client_command_pending_del((cmd)); \
- } \
+/* Executed pending command callback */
+#define SILC_CLIENT_COMMAND_EXEC_PENDING(ctx, cmd) \
+do { \
+ if ((ctx)->callback) { \
+ (*ctx->callback)(ctx->context); \
+ silc_client_command_pending_del((ctx)->sock->user_data, (cmd), \
+ (ctx)->ident); \
+ } \