[ekg2-commit] ekg2: jabber_handlers.c (HEAD) [peres]

CVS commit cvs w toxygen.net
Wto, 23 Paź 2007, 15:02:15 CEST


Module name:	ekg2
Changes by:	peres	2007-10-23 15:02:13

Modified files:
	jabber_handlers.c

Log message:
Bugfixes:
1) ecode -> atoi(ecode),
2) previously-empty-nickname entries resorting.

Index: jabber_handlers.c
===================================================================
RCS file: /home/cvs/ekg2/plugins/jabber/jabber_handlers.c,v
diff -d -u -r1.130 -r1.131
--- jabber_handlers.c	20 Oct 2007 22:02:32 -0000	1.130
+++ jabber_handlers.c	23 Oct 2007 13:02:13 -0000	1.131
@@ -994,8 +994,6 @@
 #endif
 			} else debug_error("[JABBER, MESSAGE]: <x xmlns=%s>\n", __(ns));
 /* x */		} else if (!xstrcmp(jabber_attr(xitem->atts, "xmlns"), "http://jabber.org/protocol/chatstates")) {
-			xmlnode_t *tmp;
-
 			composing = 3;	/* disable + higher prio */
 			if (!xstrcmp(xitem->name, "composing"))
 				composing = 7; /* enable + higher prio */
@@ -2620,9 +2618,10 @@
 									break;
 							}
 
-							if (*cp)
+							if (*cp) {
 								u->nickname = xstrdup(*cp);
-							else
+								userlist_replace(s, u);		/* resort */
+							} else
 								debug_error("[jabber] can't find any free nickname for UID %s.. that's kinda bitch!\n", u->uid);
 
 							xfree(userpart);
@@ -2841,7 +2840,7 @@
 			descr = saprintf("(%s) %s", ecode, __(etext));
 			xfree(etext);
 
-			if (ecode == 403 || ecode == 401) /* we lack auth */
+			if (atoi(ecode) == 403 || atoi(ecode) == 401) /* we lack auth */
 				status = EKG_STATUS_UNKNOWN; /* shall we remove the error description? */
 			else
 				status = EKG_STATUS_ERROR;


Więcej informacji o liście dyskusyjnej ekg2-commit