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

CVS commit cvs w toxygen.net
Nie, 21 Paź 2007, 00:02:35 CEST


Module name:	ekg2
Changes by:	peres	2007-10-21 00:02:33

Modified files:
	jabber.c jabber_handlers.c

Log message:
1) sending of <active/> chatstate,
2) treat 403/401 errors as 'unknown' status, with error-like description.
TODO: get 'inner tag' of errors, display it and match with error code.

Index: jabber.c
===================================================================
RCS file: /home/cvs/ekg2/plugins/jabber/jabber.c,v
diff -d -u -r1.352 -r1.353
--- jabber.c	16 Oct 2007 18:31:34 -0000	1.352
+++ jabber.c	20 Oct 2007 22:02:32 -0000	1.353
@@ -1488,6 +1488,7 @@
 			"<%s xmlns=\"http://jabber.org/protocol/chatstates\"/>"
 			"</message>\n", jid, (len ? "><composing/></x" : "/"),
 			(len ? "composing" :
+			 first == 4 ? "active" :
 			 first == 3 ? "gone" :
 			 first == 2 ? "inactive" :
 			 "paused"));

Index: jabber_handlers.c
===================================================================
RCS file: /home/cvs/ekg2/plugins/jabber/jabber_handlers.c,v
diff -d -u -r1.129 -r1.130
--- jabber_handlers.c	8 Oct 2007 12:11:36 -0000	1.129
+++ jabber_handlers.c	20 Oct 2007 22:02:32 -0000	1.130
@@ -2841,7 +2841,10 @@
 			descr = saprintf("(%s) %s", ecode, __(etext));
 			xfree(etext);
 
-			status = EKG_STATUS_ERROR;
+			if (ecode == 403 || ecode == 401) /* we lack auth */
+				status = EKG_STATUS_UNKNOWN; /* shall we remove the error description? */
+			else
+				status = EKG_STATUS_ERROR;
 			na = 1;
 
 			if (istlen) { /* we need to get&fix the UID - userlist entry is sent with @tlen.pl, but error with user-given host */


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