Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv23304

Modified Files:
        manager.c 
Log Message:
don't try to send events to dead sessions


Index: manager.c
===================================================================
RCS file: /usr/cvsroot/asterisk/manager.c,v
retrieving revision 1.125
retrieving revision 1.126
diff -u -d -r1.125 -r1.126
--- manager.c   13 Oct 2005 20:30:39 -0000      1.125
+++ manager.c   13 Oct 2005 23:29:24 -0000      1.126
@@ -1506,10 +1506,12 @@
                ast_mutex_lock(&s->__lock);
                if (s->busy) {
                        append_event(s, tmp);
-               } else if (ast_carefulwrite(s->fd, tmp, tmp_next - tmp, 
s->writetimeout) < 0) {
-                       ast_log(LOG_WARNING, "Disconnecting slow (or gone) 
manager session!\n");
-                       s->dead = 1;
-                       pthread_kill(s->t, SIGURG);
+               } else if (!s->dead) {
+                       if (ast_carefulwrite(s->fd, tmp, tmp_next - tmp, 
s->writetimeout) < 0) {
+                               ast_log(LOG_WARNING, "Disconnecting slow (or 
gone) manager session!\n");
+                               s->dead = 1;
+                               pthread_kill(s->t, SIGURG);
+                       }
                }
                ast_mutex_unlock(&s->__lock);
        }

_______________________________________________
Asterisk-Cvs mailing list
[email protected]
http://lists.digium.com/mailman/listinfo/asterisk-cvs

Reply via email to