aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mm-port-probe-at.c18
-rw-r--r--src/mm-port-probe-at.h7
-rw-r--r--src/mm-port-probe.c9
3 files changed, 4 insertions, 30 deletions
diff --git a/src/mm-port-probe-at.c b/src/mm-port-probe-at.c
index fb20a74d..d7e6fefe 100644
--- a/src/mm-port-probe-at.c
+++ b/src/mm-port-probe-at.c
@@ -92,21 +92,3 @@ mm_port_probe_response_processor_string (const gchar *command,
return TRUE;
}
-/* ---- Other ---- */
-
-gboolean
-mm_port_probe_response_processor_no_error (const gchar *command,
- const gchar *response,
- gboolean last_command,
- const GError *error,
- GVariant **result,
- GError **result_error)
-{
- if (error) {
- *result = g_variant_new_boolean (FALSE);
- return TRUE;
- }
-
- *result = g_variant_new_boolean (TRUE);
- return TRUE;
-}
diff --git a/src/mm-port-probe-at.h b/src/mm-port-probe-at.h
index d180be4f..359a6f5d 100644
--- a/src/mm-port-probe-at.h
+++ b/src/mm-port-probe-at.h
@@ -75,13 +75,6 @@ gboolean mm_port_probe_response_processor_is_at (const gchar *command,
const GError *error,
GVariant **result,
GError **result_error);
-/* Generic response parser which returns TRUE if no error */
-gboolean mm_port_probe_response_processor_no_error (const gchar *command,
- const gchar *response,
- gboolean last_command,
- const GError *error,
- GVariant **result,
- GError **result_error);
#endif /* MM_PORT_PROBE_AT_H */
diff --git a/src/mm-port-probe.c b/src/mm-port-probe.c
index abc3454b..37c2baf1 100644
--- a/src/mm-port-probe.c
+++ b/src/mm-port-probe.c
@@ -572,10 +572,9 @@ serial_probe_at_icera_result_processor (MMPortProbe *self,
GVariant *result)
{
if (result) {
- /* If any result given, it must be a boolean */
- g_assert (g_variant_is_of_type (result, G_VARIANT_TYPE_BOOLEAN));
-
- if (g_variant_get_boolean (result)) {
+ /* If any result given, it must be a string */
+ g_assert (g_variant_is_of_type (result, G_VARIANT_TYPE_STRING));
+ if (strstr (g_variant_get_string (result, NULL), "%IPSYS:")) {
mm_port_probe_set_result_at_icera (self, TRUE);
return;
}
@@ -756,7 +755,7 @@ static const MMPortProbeAtCommand product_probing[] = {
};
static const MMPortProbeAtCommand icera_probing[] = {
- { "%IPSYS?", 3, mm_port_probe_response_processor_no_error },
+ { "%IPSYS?", 3, mm_port_probe_response_processor_string },
{ NULL }
};