[asterisk-addons-commits] mnicholson: branch mnicholson/chan-mobile-refactor r798 - /team/mnicholson/ch...

SVN commits to the Asterisk addons project asterisk-addons-commits at lists.digium.com
Tue Mar 3 16:46:30 CST 2009


Author: mnicholson
Date: Tue Mar  3 16:46:27 2009
New Revision: 798

URL: http://svn.digium.com/svn-view/asterisk-addons?view=rev&rev=798
Log:
add locking support to the pvt structure

Modified:
    team/mnicholson/chan-mobile-refactor/channels/chan_mobile.c

Modified: team/mnicholson/chan-mobile-refactor/channels/chan_mobile.c
URL: http://svn.digium.com/svn-view/asterisk-addons/team/mnicholson/chan-mobile-refactor/channels/chan_mobile.c?view=diff&rev=798&r1=797&r2=798
==============================================================================
--- team/mnicholson/chan-mobile-refactor/channels/chan_mobile.c (original)
+++ team/mnicholson/chan-mobile-refactor/channels/chan_mobile.c Tue Mar  3 16:46:27 2009
@@ -139,6 +139,7 @@
 struct mbl_pvt {
 	struct ast_channel *owner;			/* Channel we belong to, possibly NULL */
 	struct ast_frame fr;				/* "null" frame */
+	ast_mutex_t lock;				/*!< pvt lock */
 	enum mbl_type type;				/* Phone or Headset */
 	char id[31];					/* The id from mobile.conf */
 	int group;					/* group number for group dialling */
@@ -3112,10 +3113,13 @@
 		goto e_return;
 	}
 
+	/* create and initialize our pvt structure */
 	if (!(pvt = ast_calloc(1, sizeof(*pvt)))) {
 		ast_log(LOG_ERROR, "Skipping device %s. Error allocating memory.\n", cat);
 		goto e_return;
 	}
+
+	ast_mutex_init(&pvt->lock);
 
 	/* set some defaults */
 




More information about the asterisk-addons-commits mailing list