[Asterisk-cvs] asterisk manager.c,1.125,1.126

kpfleming kpfleming
Thu Oct 13 19:34:48 CDT 2005


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);
 	}




More information about the svn-commits mailing list