[Asterisk-cvs] asterisk/channels chan_zap.c,1.216,1.217

markster at lists.digium.com markster at lists.digium.com
Wed Apr 28 09:46:29 CDT 2004


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

Modified Files:
	chan_zap.c 
Log Message:
Provide gethostbyname_r emulation for FreeBSD and fix zap call to setstate to include callerid (bug #1411, #1498)


Index: chan_zap.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_zap.c,v
retrieving revision 1.216
retrieving revision 1.217
diff -u -d -r1.216 -r1.217
--- chan_zap.c	28 Apr 2004 04:26:26 -0000	1.216
+++ chan_zap.c	28 Apr 2004 13:53:01 -0000	1.217
@@ -4087,11 +4087,6 @@
 			ast_log(LOG_WARNING, "Channel %d already has a %s call\n", i->channel,subnames[index]);
 		}
 		i->subs[index].owner = tmp;
-		ast_setstate(tmp, state);
-		ast_mutex_lock(&usecnt_lock);
-		usecnt++;
-		ast_mutex_unlock(&usecnt_lock);
-		ast_update_use_count();
 		strncpy(tmp->context, i->context, sizeof(tmp->context)-1);
 		/* Copy call forward info */
 		strncpy(tmp->call_forward, i->call_forward, sizeof(tmp->call_forward));
@@ -4124,6 +4119,11 @@
 		i->fake_event = 0;
 		/* Assure there is no confmute on this channel */
 		zt_confmute(i, 0);
+		ast_setstate(tmp, state);
+		ast_mutex_lock(&usecnt_lock);
+		usecnt++;
+		ast_mutex_unlock(&usecnt_lock);
+		ast_update_use_count();
 		if (startpbx) {
 			if (ast_pbx_start(tmp)) {
 				ast_log(LOG_WARNING, "Unable to start PBX on %s\n", tmp->name);




More information about the svn-commits mailing list