+ /*
+ * If we were not called due to a failure to begin the callback, then we
+ * shall zero the async context block in the server record. If we were
+ * called due to a failure to begin the callback, then it is possible that
+ * we failed due to an overlapping callback, in which case we shouldn't
+ * overwrite the async context block pointer.
+ */
+ if (reason != KeyboardCompletionFailed) {
+ /*
+ * Null out the completion context in the server record as this operation
+ * is done as far as we are concerned. The underlying keyboard library
+ * routine will take care of freeing the async context memory when the
+ * actual callback is called by irssi in the abort case. In the success
+ * case, it will free the async context memory after we return from this
+ * routine.
+ */
+ SILC_SERVER_REC *server = (SILC_SERVER_REC*)(verify->conn->context);
+ server->prompt_op = NULL;
+ }
+