[svn-commits] mvanbaak: trunk r135056 - in /trunk: ./ channels/chan_skinny.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri Aug 1 06:00:14 CDT 2008


Author: mvanbaak
Date: Fri Aug  1 06:00:13 2008
New Revision: 135056

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

........
r135055 | mvanbaak | 2008-08-01 12:55:27 +0200 (Fri, 01 Aug 2008) | 8 lines

fix some potential deadlocks in chan_skinny

(closes issue #13215)
Reported by: qwell
Patches:
      2008080100_bug13215.diff.txt uploaded by mvanbaak (license 7)
Tested by: mvanbaak

........

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

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

Modified: trunk/channels/chan_skinny.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_skinny.c?view=diff&rev=135056&r1=135055&r2=135056
==============================================================================
--- trunk/channels/chan_skinny.c (original)
+++ trunk/channels/chan_skinny.c Fri Aug  1 06:00:13 2008
@@ -1839,6 +1839,7 @@
 
 	if (letohl(req->len > SKINNY_MAX_PACKET) || letohl(req->len < 0)) {
 		ast_log(LOG_WARNING, "transmit_response: the length of the request is out of bounds\n");
+		ast_mutex_unlock(&s->lock);
 		return -1;
 	}
 
@@ -2872,7 +2873,7 @@
 				l->label);
 		}
 	}
-	AST_LIST_LOCK(&devices);
+	AST_LIST_UNLOCK(&devices);
 	return CLI_SUCCESS;
 }
 
@@ -6274,6 +6275,7 @@
 		if(setsockopt(skinnysock, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)) == -1) {
 			ast_log(LOG_ERROR, "Set Socket Options failed: errno %d, %s\n", errno, strerror(errno));
 			ast_config_destroy(cfg);
+			ast_mutex_unlock(&netlock);
 			return 0;
 		}
 		if (skinnysock < 0) {
@@ -6286,6 +6288,7 @@
 				close(skinnysock);
 				skinnysock = -1;
 				ast_config_destroy(cfg);
+				ast_mutex_unlock(&netlock);
 				return 0;
 			}
 			if (listen(skinnysock,DEFAULT_SKINNY_BACKLOG)) {
@@ -6295,6 +6298,7 @@
 					close(skinnysock);
 					skinnysock = -1;
 					ast_config_destroy(cfg);
+					ast_mutex_unlock(&netlock);
 					return 0;
 			}
 			ast_verb(2, "Skinny listening on %s:%d\n",




More information about the svn-commits mailing list