[asterisk-addons-commits] file: trunk r413 - /trunk/chan_mobile.c

SVN commits to the Asterisk addons project asterisk-addons-commits at lists.digium.com
Wed Jul 18 09:31:51 CDT 2007


Author: file
Date: Wed Jul 18 09:31:50 2007
New Revision: 413

URL: http://svn.digium.com/view/asterisk-addons?view=rev&rev=413
Log:
(closes issue #10221)
Reported by: galmague

Add extra error checking for when sdp_connect fails.

Modified:
    trunk/chan_mobile.c

Modified: trunk/chan_mobile.c
URL: http://svn.digium.com/view/asterisk-addons/trunk/chan_mobile.c?view=diff&rev=413&r1=412&r2=413
==============================================================================
--- trunk/chan_mobile.c (original)
+++ trunk/chan_mobile.c Wed Jul 18 09:31:50 2007
@@ -1064,8 +1064,10 @@
 
 	sdp_set_info_attr(record, service_name, service_prov, service_dsc);
 
-	session = sdp_connect(BDADDR_ANY, BDADDR_LOCAL, SDP_RETRY_IF_BUSY);
-	err = sdp_record_register(session, record, 0);
+	if (!(session = sdp_connect(BDADDR_ANY, BDADDR_LOCAL, SDP_RETRY_IF_BUSY)))
+		ast_log(LOG_WARNING, "Failed to connect sdp and create session.\n");
+	else
+		err = sdp_record_register(session, record, 0);
 
 	sdp_data_free(channel);
 	sdp_list_free(rfcomm_list, 0);




More information about the asterisk-addons-commits mailing list