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

SVN commits to the Asterisk addons project asterisk-addons-commits at lists.digium.com
Fri Mar 13 15:21:28 CDT 2009


Author: mnicholson
Date: Fri Mar 13 15:21:25 2009
New Revision: 809

URL: http://svn.digium.com/svn-view/asterisk-addons?view=rev&rev=809
Log:
goto e_cleanup instead of using break

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=809&r1=808&r2=809
==============================================================================
--- team/mnicholson/chan-mobile-refactor/channels/chan_mobile.c (original)
+++ team/mnicholson/chan-mobile-refactor/channels/chan_mobile.c Fri Mar 13 15:21:25 2009
@@ -3355,7 +3355,7 @@
 				else
 					ast_debug(1, "[%s] error reading from device: %s (%d)\n", pvt->id, buf, errno);
 
-				break;
+				goto e_cleanup;
 			}
 			ast_debug(1, "[%s] %s\n", pvt->id, buf);
 
@@ -3366,7 +3366,7 @@
 					pvt->state = MBL_STATE_INCOMING;
 					if (hsp_send_vgs(pvt->rfcomm_socket, 13) || hsp_send_vgm(pvt->rfcomm_socket, 13)) {
 						ast_debug(1, "[%s] error sending VGS/VGM\n", pvt->id);
-						break;
+						goto e_cleanup;
 					}
 				}
 				break;
@@ -3386,7 +3386,7 @@
 			} else if (at_msg == AT_UNKNOWN) {
 				if (hsp_send_error(pvt->rfcomm_socket)) {
 					ast_debug(1, "[%s] error sending ERROR\n", pvt->id);
-					break;
+					goto e_cleanup;
 				}
 			}
 		} else {	/* Timeouts */
@@ -3401,7 +3401,7 @@
 						ast_log(LOG_ERROR, "error monitoring new audio connection for device %s\n", pvt->id);
 						ast_queue_control(pvt->owner, AST_CONTROL_HANGUP);
 						close(pvt->sco_socket);
-						break;
+						goto e_cleanup;
 					}
 					ast_setstate(pvt->owner, AST_STATE_RINGING);
 					ast_queue_control(pvt->owner, AST_CONTROL_RINGING);
@@ -3412,7 +3412,7 @@
 			} else if (pvt->state == MBL_STATE_RING2) {
 				if (hsp_send_ring(pvt->rfcomm_socket)) {
 					ast_debug(1, "[%s] error sending RING\n", pvt->id);
-					break;
+					goto e_cleanup;
 				}
 			}
 		}




More information about the asterisk-addons-commits mailing list