[ekg2-commit] ekg2: jabber.c (HEAD) [darkjames]
CVS commit
cvs w toxygen.net
Śro, 26 Gru 2007, 12:22:27 CET
Module name: ekg2
Changes by: darkjames 2007-12-26 12:22:24
Modified files:
jabber.c
Log message:
fix jabber_handle_disconnect()
Index: jabber.c
===================================================================
RCS file: /home/cvs/ekg2/plugins/jabber/jabber.c,v
diff -d -u -r1.359 -r1.360
--- jabber.c 22 Nov 2007 20:12:17 -0000 1.359
+++ jabber.c 26 Dec 2007 11:22:24 -0000 1.360
@@ -378,18 +378,14 @@
}
void jabber_handle_disconnect(session_t *s, const char *reason, int type) {
- static int lock = 0;
jabber_private_t *j;
if (!s || !(j = s->priv))
return;
- /* it's basic code.. I think is shouldn't fail. Hopefully we are single-threaded.. */
- if (lock) {
- debug("jabber_handle_disconnect() locked!\n");
+ if (!s->connected && !j->connecting)
return;
- } lock = 1;
-
+
j->connecting = 0;
if (j->send_watch) {
@@ -402,8 +398,6 @@
watch_remove(&jabber_plugin, j->fd, WATCH_WRITE);
watch_remove(&jabber_plugin, j->fd, WATCH_READ);
- lock = 0; /* release lock. */ /* yeah, i know it's ugly. but we don't want jabber_handle_disconnect() calls from watcher handlers */
-
j->using_compress = JABBER_COMPRESSION_NONE;
#ifdef JABBER_HAVE_SSL
if (j->using_ssl && j->ssl_session)
Więcej informacji o liście dyskusyjnej ekg2-commit