[asterisk-addons-commits] mnicholson: trunk r837 - /trunk/channels/chan_mobile.c

SVN commits to the Asterisk addons project asterisk-addons-commits at lists.digium.com
Wed Apr 1 13:56:04 CDT 2009


Author: mnicholson
Date: Wed Apr  1 13:56:00 2009
New Revision: 837

URL: http://svn.digium.com/svn-view/asterisk-addons?view=rev&rev=837
Log:
Ensure proper queue management when handling clip messages.

Modified:
    trunk/channels/chan_mobile.c

Modified: trunk/channels/chan_mobile.c
URL: http://svn.digium.com/svn-view/asterisk-addons/trunk/channels/chan_mobile.c?view=diff&rev=837&r1=836&r2=837
==============================================================================
--- trunk/channels/chan_mobile.c (original)
+++ trunk/channels/chan_mobile.c Wed Apr  1 13:56:00 2009
@@ -3127,6 +3127,8 @@
 	struct ast_channel *chan;
 
 	if ((msg = msg_queue_head(pvt)) && msg->expected == AT_CLIP) {
+		msg_queue_free_and_pop(pvt);
+
 		pvt->needcallerid = 0;
 		if (!(clip = hfp_parse_clip(pvt->hfp, buf))) {
 			ast_debug(1, "[%s] error parsing CLIP: %s\n", pvt->id, buf);
@@ -3144,8 +3146,6 @@
 			mbl_ast_hangup(pvt);
 			return -1;
 		}
-
-		msg_queue_free_and_pop(pvt);
 	}
 
 	return 0;




More information about the asterisk-addons-commits mailing list