aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mm-modem-mbm.c4
-rw-r--r--plugins/mm-plugin-longcheer.c3
-rw-r--r--plugins/mm-plugin-x22x.c3
3 files changed, 7 insertions, 3 deletions
diff --git a/plugins/mm-modem-mbm.c b/plugins/mm-modem-mbm.c
index 61499100..65283e47 100644
--- a/plugins/mm-modem-mbm.c
+++ b/plugins/mm-modem-mbm.c
@@ -730,7 +730,9 @@ enap_poll_response (MMAtSerialPort *port,
count = GPOINTER_TO_UINT (mm_callback_info_get_data (info, "mbm-enap-poll-count"));
- if (sscanf (response->str, "*ENAP: %d", &state) == 1 && state == 1) {
+ if ( response
+ && sscanf (response->str, "*ENAP: %d", &state) == 1
+ && state == 1) {
/* Success! Connected... */
mm_generic_gsm_connect_complete (MM_GENERIC_GSM (info->modem), NULL, info);
return;
diff --git a/plugins/mm-plugin-longcheer.c b/plugins/mm-plugin-longcheer.c
index 8124edd4..1570cf4b 100644
--- a/plugins/mm-plugin-longcheer.c
+++ b/plugins/mm-plugin-longcheer.c
@@ -72,12 +72,13 @@ custom_init_response_cb (MMPluginBaseSupportsTask *task,
guint32 *out_level,
gpointer user_data)
{
- const char *p = response->str;
+ const char *p;
if (error)
return tries <= 4 ? TRUE : FALSE;
/* Note the lack of a ':' on the GMR; the X200 doesn't send one */
+ g_assert (response);
p = mm_strip_tag (response->str, "AT+GMR");
if (*p == 'L') {
/* X200 modems have a GMR firmware revision that starts with 'L', and
diff --git a/plugins/mm-plugin-x22x.c b/plugins/mm-plugin-x22x.c
index 059bb51e..10a1b4c8 100644
--- a/plugins/mm-plugin-x22x.c
+++ b/plugins/mm-plugin-x22x.c
@@ -70,12 +70,13 @@ custom_init_response_cb (MMPluginBaseSupportsTask *task,
guint32 *out_level,
gpointer user_data)
{
- const char *p = response->str;
+ const char *p;
if (error)
return tries <= 4 ? TRUE : FALSE;
/* Note the lack of a ':' on the GMR; the X200 doesn't send one */
+ g_assert (response);
p = mm_strip_tag (response->str, "AT+GMR");
if (*p != 'L') {
/* X200 modems have a GMR firmware revision that starts with 'L', and