diff --git a/src/common/connection.py b/src/common/connection.py index bcd2b3fda..78f2e3a36 100644 --- a/src/common/connection.py +++ b/src/common/connection.py @@ -168,8 +168,8 @@ class Connection(ConnectionHandlers): req['username'] = self.new_account_info['name'] req['password'] = self.new_account_info['password'] def _on_register_result(result): - if not result: - self.dispatch('ACC_NOT_OK', (self.connection.lastErr)) + if not common.xmpp.isResultNode(result): + self.dispatch('ACC_NOT_OK', (result.getError())) return self.connected = 0 self.password = self.new_account_info['password'] diff --git a/src/common/xmpp/features_nb.py b/src/common/xmpp/features_nb.py index 6f4a7326d..85fb63985 100644 --- a/src/common/xmpp/features_nb.py +++ b/src/common/xmpp/features_nb.py @@ -149,7 +149,7 @@ def register(disp, host, info, cb): info=info.asDict() for i in info.keys(): iq.setTag('query').setTagData(i,info[i]) - _on_default_response(disp, iq, cb) + disp.SendAndCallForResponse(iq, cb) def unregister(disp, host, cb): """ Unregisters with host (permanently removes account).