[Home]

Summary:ASTERISK-09894: chan_mobile: if not load kernel module l2cap, asterisk crash
Reporter:Gabriel Almaguer (galmague)Labels:
Date Opened:2007-07-17 14:38:32Date Closed:2007-07-18 09:14:52
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Addons/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:
in chan_mobile
if not load module l2cap

coredump.

****** ADDITIONAL INFORMATION ******


the solution is a verify session variable != NULL.

--- chan_mobile.c       (revision 412)
+++ chan_mobile.c       (working copy)
@@ -1065,7 +1065,12 @@
       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==NULL)   /* Patch galmague 20070715*/
+        {
+            ast_log(LOG_ERROR, "Unable open sdp (check kernel modules l2cap sco )");
+        }
+        else
+           err = sdp_record_register(session, record, 0);

       sdp_data_free(channel);
       sdp_list_free(rfcomm_list, 0);
Comments:By: Digium Subversion (svnbot) 2007-07-18 09:14:51

Repository: asterisk-addons
Revision: 413

------------------------------------------------------------------------
r413 | file | 2007-07-18 09:14:50 -0500 (Wed, 18 Jul 2007) | 5 lines

(closes issue ASTERISK-9894)
Reported by: galmague

Add extra error checking for when sdp_connect fails.

------------------------------------------------------------------------