[asterisk-commits] russell: trunk r67863 - in /trunk: ./ channels/chan_sip.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed Jun 6 14:16:19 MST 2007


Author: russell
Date: Wed Jun  6 16:16:18 2007
New Revision: 67863

URL: http://svn.digium.com/view/asterisk?view=rev&rev=67863
Log:
Merged revisions 67862 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r67862 | russell | 2007-06-06 16:14:46 -0500 (Wed, 06 Jun 2007) | 4 lines

Fix a crash when doing call pickups with SIP phones.  The code unlocked the
channel when it should not have.
(issue #9652, reported by corruptor, fixed by me)

........

Modified:
    trunk/   (props changed)
    trunk/channels/chan_sip.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?view=diff&rev=67863&r1=67862&r2=67863
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Wed Jun  6 16:16:18 2007
@@ -1571,7 +1571,7 @@
 
 /*------Request handling functions */
 static int handle_request(struct sip_pvt *p, struct sip_request *req, struct sockaddr_in *sin, int *recount, int *nounlock);
-static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, int debug, int seqno, struct sockaddr_in *sin, int *recount, char *e);
+static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, int debug, int seqno, struct sockaddr_in *sin, int *recount, char *e, int *nounlock);
 static int handle_request_refer(struct sip_pvt *p, struct sip_request *req, int debug, int seqno, int *nounlock);
 static int handle_request_bye(struct sip_pvt *p, struct sip_request *req);
 static int handle_request_register(struct sip_pvt *p, struct sip_request *req, struct sockaddr_in *sin, char *e);
@@ -14151,7 +14151,7 @@
  *	plan but tries to find the active call and masquerade
  *	into it 
  */
-static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, int debug, int seqno, struct sockaddr_in *sin, int *recount, char *e)
+static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, int debug, int seqno, struct sockaddr_in *sin, int *recount, char *e, int *nounlock)
 {
 	int res = 1;
 	int gotdest;
@@ -14524,6 +14524,7 @@
 				}
 			} else {	/* Pickup call in call group */
 				ast_channel_unlock(c);
+				*nounlock = 1;
 				if (ast_pickup_call(c)) {
 					ast_log(LOG_NOTICE, "Nothing to pick up for %s\n", p->callid);
 					if (ast_test_flag(req, SIP_PKT_IGNORE))
@@ -15795,7 +15796,7 @@
 		res = handle_request_options(p, req);
 		break;
 	case SIP_INVITE:
-		res = handle_request_invite(p, req, debug, seqno, sin, recount, e);
+		res = handle_request_invite(p, req, debug, seqno, sin, recount, e, nounlock);
 		break;
 	case SIP_REFER:
 		res = handle_request_refer(p, req, debug, seqno, nounlock);



More information about the asterisk-commits mailing list