[Asterisk-cvs] asterisk/channels chan_sip.c,1.201,1.202 chan_zap.c,1.112,1.113

markster at lists.digium.com markster at lists.digium.com
Fri Oct 24 12:56:39 CDT 2003


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

Modified Files:
	chan_sip.c chan_zap.c 
Log Message:
Check that there really is a tag


Index: chan_sip.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v
retrieving revision 1.201
retrieving revision 1.202
diff -u -d -r1.201 -r1.202
--- chan_sip.c	23 Oct 2003 03:58:40 -0000	1.201
+++ chan_sip.c	24 Oct 2003 18:22:45 -0000	1.202
@@ -1629,7 +1629,7 @@
 	p = iflist;
 	while(p) {
 		if (!strcmp(p->callid, callid) && 
-			(!pedanticsipchecking || !strlen(p->theirtag) || !strcmp(p->theirtag, tag))) {
+			(!pedanticsipchecking || !tag || !strlen(p->theirtag) || !strcmp(p->theirtag, tag))) {
 			/* Found the call */
 			ast_mutex_lock(&p->lock);
 			ast_mutex_unlock(&iflock);

Index: chan_zap.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_zap.c,v
retrieving revision 1.112
retrieving revision 1.113
diff -u -d -r1.112 -r1.113
--- chan_zap.c	22 Oct 2003 04:04:59 -0000	1.112
+++ chan_zap.c	24 Oct 2003 18:22:45 -0000	1.113
@@ -188,6 +188,8 @@
 
 static int adsi = 0;
 
+static int numbufs = 4;
+
 #ifdef ZAPATA_PRI
 static int minunused = 2;
 static int minidle = 0;
@@ -659,7 +661,7 @@
 			if (!res) {
 				bi.txbufpolicy = ZT_POLICY_IMMEDIATE;
 				bi.rxbufpolicy = ZT_POLICY_IMMEDIATE;
-				bi.numbufs = 4;
+				bi.numbufs = numbufs;
 				res = ioctl(p->subs[x].zfd, ZT_SET_BUFINFO, &bi);
 				if (res < 0) {
 					ast_log(LOG_WARNING, "Unable to set buffer policy on channel %d\n", x);
@@ -5116,7 +5118,7 @@
 			if (!res) {
 				bi.txbufpolicy = ZT_POLICY_IMMEDIATE;
 				bi.rxbufpolicy = ZT_POLICY_IMMEDIATE;
-				bi.numbufs = 4;
+				bi.numbufs = numbufs;
 				res = ioctl(tmp->subs[SUB_REAL].zfd, ZT_SET_BUFINFO, &bi);
 				if (res < 0) {
 					ast_log(LOG_WARNING, "Unable to set buffer policy on channel %d\n", channel);
@@ -5301,7 +5303,7 @@
 		if (!res) {
 			bi.txbufpolicy = ZT_POLICY_IMMEDIATE;
 			bi.rxbufpolicy = ZT_POLICY_IMMEDIATE;
-			bi.numbufs = 4;
+			bi.numbufs = numbufs;
 			res = ioctl(p->subs[SUB_REAL].zfd, ZT_SET_BUFINFO, &bi);
 			if (res < 0) {
 				ast_log(LOG_WARNING, "Unable to set buffer policy on dup channel\n");
@@ -6267,7 +6269,7 @@
 	}
 	bi.txbufpolicy = ZT_POLICY_IMMEDIATE;
 	bi.rxbufpolicy = ZT_POLICY_IMMEDIATE;
-	bi.numbufs = 8;
+	bi.numbufs = 16;
 	bi.bufsize = 1024;
 	if (ioctl(pri->fd, ZT_SET_BUFINFO, &bi)) {
 		ast_log(LOG_ERROR, "Unable to set appropriate buffering on channel %d\n", x);
@@ -6781,6 +6783,8 @@
 			strncpy(musicclass, v->value, sizeof(musicclass)-1);
 		} else if (!strcasecmp(v->name, "stripmsd")) {
 			stripmsd = atoi(v->value);
+		} else if (!strcasecmp(v->name, "jitterbuffers")) {
+			numbufs = atoi(v->value);
 		} else if (!strcasecmp(v->name, "group")) {
 			cur_group = ast_get_group(v->value);
 		} else if (!strcasecmp(v->name, "callgroup")) {
@@ -7319,6 +7323,8 @@
 				ast_mutex_unlock(&iflock);
 				return -1;
 			}
+		} else if (!strcasecmp(v->name, "jitterbuffers")) {
+			numbufs = atoi(v->value);
 		} else if (!strcasecmp(v->name, "minunused")) {
 			minunused = atoi(v->value);
 		} else if (!strcasecmp(v->name, "idleext")) {




More information about the svn-commits mailing list