[asterisk-commits] russell: branch 1.6.0 r106309 - in /branches/1.6.0: ./ funcs/func_global.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Mar 5 18:15:55 CST 2008


Author: russell
Date: Wed Mar  5 18:15:54 2008
New Revision: 106309

URL: http://svn.digium.com/view/asterisk?view=rev&rev=106309
Log:
Merged revisions 105899 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

........
r105899 | russell | 2008-03-04 18:45:39 -0600 (Tue, 04 Mar 2008) | 3 lines

Fix the SHARED() read callback to properly unlock the channel.  This function
could not have worked, as it left the channel locked in all cases.

........

Modified:
    branches/1.6.0/   (props changed)
    branches/1.6.0/funcs/func_global.c

Propchange: branches/1.6.0/
------------------------------------------------------------------------------
--- trunk-merged (original)
+++ trunk-merged Wed Mar  5 18:15:54 2008
@@ -1,1 +1,1 @@
-/trunk:1-105595,105675,105677,105733-105734,105773,105785,105804,105840-105841,105864,106036,106040,106139
+/trunk:1-105595,105675,105677,105733-105734,105773,105785,105804,105840-105841,105864,105899,106036,106040,106139

Modified: branches/1.6.0/funcs/func_global.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.0/funcs/func_global.c?view=diff&rev=106309&r1=106308&r2=106309
==============================================================================
--- branches/1.6.0/funcs/func_global.c (original)
+++ branches/1.6.0/funcs/func_global.c Wed Mar  5 18:15:54 2008
@@ -109,8 +109,11 @@
 	} else
 		ast_channel_lock(chan);
 
-	if (!(varstore = ast_channel_datastore_find(chan, &shared_variable_info, NULL)))
+	if (!(varstore = ast_channel_datastore_find(chan, &shared_variable_info, NULL))) {
+		ast_channel_unlock(chan);
 		return -1;
+	}
+
 	varshead = varstore->data;
 	*buf = '\0';
 
@@ -121,6 +124,8 @@
 			break;
 		}
 	}
+
+	ast_channel_unlock(chan);
 
 	return 0;
 }




More information about the asterisk-commits mailing list