[Asterisk-cvs] asterisk Makefile,1.75,1.75.2.1 manager.c,1.37,1.37.2.1

markster at lists.digium.com markster at lists.digium.com
Sat Feb 7 01:05:29 CST 2004


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

Modified Files:
      Tag: v1-0_stable
	Makefile manager.c 
Log Message:
Insert blank after REFER (bug #997)
Correct path to VM sample (bug #994)
Make manager interface non-blocking (bug #861)
Don't bork on empty from in SIP (bug #887)


Index: Makefile
===================================================================
RCS file: /usr/cvsroot/asterisk/Makefile,v
retrieving revision 1.75
retrieving revision 1.75.2.1
diff -u -d -r1.75 -r1.75.2.1
--- Makefile	14 Jan 2004 06:48:38 -0000	1.75
+++ Makefile	7 Feb 2004 07:14:13 -0000	1.75.2.1
@@ -397,7 +397,7 @@
 	for x in vm-theperson digits/1 digits/2 digits/3 digits/4 vm-isunavail; do \
 		cat $(DESTDIR)$(ASTVARLIBDIR)/sounds/$$x.gsm >> $(DESTDIR)$(ASTSPOOLDIR)/voicemail/default/1234/unavail.gsm ; \
 	done
-	:> $(DESTDIR)$(ASTVARLIBDIR)/sounds/voicemail/default/1234/busy.gsm
+	:> $(DESTDIR)$(ASTSPOOLDIR)/voicemail/default/1234/busy.gsm
 	for x in vm-theperson digits/1 digits/2 digits/3 digits/4 vm-isonphone; do \
 		cat $(DESTDIR)$(ASTVARLIBDIR)/sounds/$$x.gsm >> $(DESTDIR)$(ASTSPOOLDIR)/voicemail/default/1234/busy.gsm ; \
 	done

Index: manager.c
===================================================================
RCS file: /usr/cvsroot/asterisk/manager.c,v
retrieving revision 1.37
retrieving revision 1.37.2.1
diff -u -d -r1.37 -r1.37.2.1
--- manager.c	29 Jan 2004 00:28:51 -0000	1.37
+++ manager.c	7 Feb 2004 07:14:13 -0000	1.37.2.1
@@ -727,6 +727,7 @@
 	struct mansession *s;
 	struct protoent *p;
 	int arg = 1;
+	int flags;
 	pthread_attr_t attr;
 
 	pthread_attr_init(&attr);
@@ -752,6 +753,9 @@
 		} 
 		memset(s, 0, sizeof(struct mansession));
 		memcpy(&s->sin, &sin, sizeof(sin));
+		/* For safety, make sure socket is non-blocking */
+		flags = fcntl(as, F_GETFL);
+		fcntl(as, F_SETFL, flags | O_NONBLOCK);
 		ast_mutex_init(&s->lock);
 		s->fd = as;
 		ast_mutex_lock(&sessionlock);




More information about the svn-commits mailing list