mirror of
https://github.com/profanity-im/profanity.git
synced 2024-11-03 19:37:16 -05:00
REGISTRATION FIXED
This commit is contained in:
parent
8a6f1b52d7
commit
f53b4353fd
@ -380,7 +380,7 @@ static int iq_reg2_cb(xmpp_conn_t *xmpp_conn, xmpp_stanza_t *stanza, void *userd
|
|||||||
goto quit;
|
goto quit;
|
||||||
|
|
||||||
quit:
|
quit:
|
||||||
//connection_disconnect();
|
xmpp_disconnect(xmpp_conn);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -397,13 +397,13 @@ static int iq_reg_cb(xmpp_conn_t *xmpp_conn, xmpp_stanza_t *stanza, void *userda
|
|||||||
char* error_message = stanza_get_error_message(stanza);
|
char* error_message = stanza_get_error_message(stanza);
|
||||||
cons_show_error("Server error: %s", error_message);
|
cons_show_error("Server error: %s", error_message);
|
||||||
log_debug("Registration error: %s", error_message);
|
log_debug("Registration error: %s", error_message);
|
||||||
connection_disconnect();
|
xmpp_disconnect(xmpp_conn);
|
||||||
goto quit;
|
goto quit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcmp(type, "result") != 0) {
|
if (strcmp(type, "result") != 0) {
|
||||||
log_debug("Expected type 'result', but got %s.", type);
|
log_debug("Expected type 'result', but got %s.", type);
|
||||||
connection_disconnect();
|
xmpp_disconnect(xmpp_conn);
|
||||||
goto quit;
|
goto quit;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -413,7 +413,7 @@ static int iq_reg_cb(xmpp_conn_t *xmpp_conn, xmpp_stanza_t *stanza, void *userda
|
|||||||
if (registered != NULL) {
|
if (registered != NULL) {
|
||||||
cons_show_error("Already registered.");
|
cons_show_error("Already registered.");
|
||||||
log_debug("Already registered.");
|
log_debug("Already registered.");
|
||||||
connection_disconnect();
|
xmpp_disconnect(xmpp_conn);
|
||||||
goto quit;
|
goto quit;
|
||||||
}
|
}
|
||||||
xmpp_stanza_t* iq = stanza_register_new_account(conn.xmpp_ctx, reg->username, reg->password);
|
xmpp_stanza_t* iq = stanza_register_new_account(conn.xmpp_ctx, reg->username, reg->password);
|
||||||
@ -433,7 +433,7 @@ _register_handle_error(xmpp_conn_t *xmpp_conn, xmpp_stanza_t *stanza, void *user
|
|||||||
char* error_message = stanza_get_error_message(stanza);
|
char* error_message = stanza_get_error_message(stanza);
|
||||||
cons_show_error("Server error: %s", error_message);
|
cons_show_error("Server error: %s", error_message);
|
||||||
log_debug("Registration error: %s", error_message);
|
log_debug("Registration error: %s", error_message);
|
||||||
connection_disconnect();
|
xmpp_disconnect(xmpp_conn);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -454,7 +454,7 @@ static int _register_handle_proceedtls_default(xmpp_conn_t *xmpp_conn,
|
|||||||
} else {
|
} else {
|
||||||
log_debug("TLS failed.");
|
log_debug("TLS failed.");
|
||||||
/* failed tls spoils the connection, so disconnect */
|
/* failed tls spoils the connection, so disconnect */
|
||||||
connection_disconnect();
|
xmpp_disconnect(xmpp_conn);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
@ -465,7 +465,7 @@ static int _register_handle_missing_features(xmpp_conn_t *xmpp_conn, void *userd
|
|||||||
(void)userdata;
|
(void)userdata;
|
||||||
|
|
||||||
log_debug("Timeout");
|
log_debug("Timeout");
|
||||||
connection_disconnect();
|
xmpp_disconnect(xmpp_conn);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -500,7 +500,7 @@ _register_handle_features(xmpp_conn_t *xmpp_conn, xmpp_stanza_t *stanza, void *u
|
|||||||
if (child && strcmp(xmpp_stanza_get_ns(child), XMPP_NS_REGISTER) == 0) {
|
if (child && strcmp(xmpp_stanza_get_ns(child), XMPP_NS_REGISTER) == 0) {
|
||||||
log_debug("Server does not support in-band registration.");
|
log_debug("Server does not support in-band registration.");
|
||||||
cons_show_error("Server does not support in-band registration, aborting.");
|
cons_show_error("Server does not support in-band registration, aborting.");
|
||||||
connection_disconnect();
|
xmpp_disconnect(xmpp_conn);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user