[ekg2-commit] ekg2: jabber.c (HEAD) [darkjames]
CVS commit
cvs w toxygen.net
Czw, 22 Lis 2007, 21:12:20 CET
Module name: ekg2
Changes by: darkjames 2007-11-22 21:12:18
Modified files:
jabber.c
Log message:
fix /xmpp:register when SASL is turned on.
Index: jabber.c
===================================================================
RCS file: /home/cvs/ekg2/plugins/jabber/jabber.c,v
diff -d -u -r1.358 -r1.359
--- jabber.c 22 Nov 2007 18:32:36 -0000 1.358
+++ jabber.c 22 Nov 2007 20:12:17 -0000 1.359
@@ -460,7 +460,15 @@
username = xstrndup(s->uid + 5, tmp - s->uid - 5);
else username = xstrdup(s->uid + 5);
- if (!j->istlen && session_get(s, "__new_account")) {
+ /* XXX,
+ * Here if we've got SASL-connection we should do jabber:iq:register only when
+ * j->connecting == 1,
+ *
+ * but i'm not quite sure if s->connected, and j->connecting can be 0 [yeap, i know it would be stupid]
+ * So, to avoid regression, we use here j->connecting != 2
+ */
+
+ if (!j->istlen && j->connecting != 2 && session_get(s, "__new_account")) {
char *epasswd = jabber_escape(passwd);
watch_write(j->send_watch,
"<iq type=\"set\" to=\"%s\" id=\"register%d\">"
Więcej informacji o liście dyskusyjnej ekg2-commit