[asterisk-commits] kpfleming: branch sruffell/asterisk-1.4-transcoder r167661 - in /team/sruffel...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jan 8 08:19:13 CST 2009


Author: kpfleming
Date: Thu Jan  8 08:19:09 2009
New Revision: 167661

URL: http://svn.digium.com/view/asterisk?view=rev&rev=167661
Log:
bring up to date and re-enable automerge

Modified:
    team/sruffell/asterisk-1.4-transcoder/   (props changed)
    team/sruffell/asterisk-1.4-transcoder/channels/chan_sip.c

Propchange: team/sruffell/asterisk-1.4-transcoder/
------------------------------------------------------------------------------
    automerge = yes

Propchange: team/sruffell/asterisk-1.4-transcoder/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Thu Jan  8 08:19:09 2009
@@ -1,1 +1,1 @@
-/branches/1.4:1-167615
+/branches/1.4:1-167660

Modified: team/sruffell/asterisk-1.4-transcoder/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/sruffell/asterisk-1.4-transcoder/channels/chan_sip.c?view=diff&rev=167661&r1=167660&r2=167661
==============================================================================
--- team/sruffell/asterisk-1.4-transcoder/channels/chan_sip.c (original)
+++ team/sruffell/asterisk-1.4-transcoder/channels/chan_sip.c Thu Jan  8 08:19:09 2009
@@ -1023,8 +1023,8 @@
 	struct sip_history_head *history;	/*!< History of this SIP dialog */
 	size_t history_entries;			/*!< Number of entires in the history */
 	struct ast_variable *chanvars;		/*!< Channel variables to set for inbound call */
-	AST_LIST_HEAD_NOLOCK(request_queue, sip_request) request_queue;
-	int request_queue_sched_id;
+	AST_LIST_HEAD_NOLOCK(request_queue, sip_request) request_queue; /*!< Requests that arrived but could not be processed immediately */
+	int request_queue_sched_id;		/*!< Scheduler ID of any scheduled action to process queued requests */
 	struct sip_pvt *next;			/*!< Next dialog in chain */
 	struct sip_invite_param *options;	/*!< Options for INVITE */
 	int autoframing;
@@ -15933,7 +15933,7 @@
 static void process_request_queue(struct sip_pvt *p, int *recount, int *nounlock)
 {
 	struct sip_request *req;
-	
+
 	while ((req = AST_LIST_REMOVE_HEAD(&p->request_queue, next))) {
 		if (handle_request(p, req, &p->recv, recount, nounlock) == -1) {
 			/* Request failed */
@@ -16079,14 +16079,7 @@
 		/* because this is deadlock-prone, we need to try and unlock if failed */
 		if (!p->owner || !ast_channel_trylock(p->owner))
 			break;	/* locking succeeded */
-		if (lockretry == 1) {
-			if (option_debug) {
-				ast_log(LOG_DEBUG, "Failed to grab owner channel lock. (SIP call %s)\n", p->callid);
-			}
-		} else {
-			if (option_debug) {
-				ast_log(LOG_DEBUG, "Failed to grab owner channel lock, trying again. (SIP call %s)\n", p->callid);
-			}
+		if (lockretry != 1) {
 			ast_mutex_unlock(&p->lock);
 			ast_mutex_unlock(&netlock);
 			/* Sleep for a very short amount of time */
@@ -16106,10 +16099,9 @@
 			return 1;
 		}
 
-		/* XXX Wouldn't p->owner always exist here? */
-		/* This is unsafe, since p->owner wouldn't be locked. */
+		/* This is unsafe, since p->owner is not locked. */
 		if (p->owner)
-			ast_log(LOG_ERROR, "We could NOT get the channel lock for %s! \n", S_OR(p->owner->name, "- no channel name ??? - "));
+			ast_log(LOG_ERROR, "Channel lock for %s could not be obtained, and request was unable to be queued.\n", S_OR(p->owner->name, "- no channel name ??? - "));
 		ast_log(LOG_ERROR, "SIP transaction failed: %s \n", p->callid);
 		if (req.method != SIP_ACK)
 			transmit_response(p, "503 Server error", &req);	/* We must respond according to RFC 3261 sec 12.2 */




More information about the asterisk-commits mailing list