base-modem-at: add 'raw' handling to `mm_base_modem_at_command_full()'
This commit is contained in:
@@ -451,8 +451,8 @@ at_command_context_free (AtCommandContext *ctx)
|
||||
|
||||
const gchar *
|
||||
mm_base_modem_at_command_full_finish (MMBaseModem *self,
|
||||
GAsyncResult *res,
|
||||
GError **error)
|
||||
GAsyncResult *res,
|
||||
GError **error)
|
||||
{
|
||||
if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (res), error))
|
||||
return NULL;
|
||||
@@ -497,6 +497,7 @@ mm_base_modem_at_command_full (MMBaseModem *self,
|
||||
const gchar *command,
|
||||
guint timeout,
|
||||
gboolean allow_cached,
|
||||
gboolean is_raw,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data)
|
||||
@@ -531,14 +532,13 @@ mm_base_modem_at_command_full (MMBaseModem *self,
|
||||
NULL);
|
||||
}
|
||||
|
||||
|
||||
/* Go on with the command */
|
||||
if (allow_cached)
|
||||
mm_at_serial_port_queue_command_cached (
|
||||
port,
|
||||
command,
|
||||
timeout,
|
||||
FALSE,
|
||||
is_raw,
|
||||
ctx->cancellable,
|
||||
(MMAtSerialResponseFn)at_command_parse_response,
|
||||
ctx);
|
||||
@@ -547,7 +547,7 @@ mm_base_modem_at_command_full (MMBaseModem *self,
|
||||
port,
|
||||
command,
|
||||
timeout,
|
||||
FALSE,
|
||||
is_raw,
|
||||
ctx->cancellable,
|
||||
(MMAtSerialResponseFn)at_command_parse_response,
|
||||
ctx);
|
||||
@@ -588,6 +588,7 @@ mm_base_modem_at_command (MMBaseModem *self,
|
||||
command,
|
||||
timeout,
|
||||
allow_cached,
|
||||
FALSE,
|
||||
NULL,
|
||||
callback,
|
||||
user_data);
|
||||
|
||||
@@ -149,6 +149,7 @@ void mm_base_modem_at_command_full (MMBaseModem *self,
|
||||
const gchar *command,
|
||||
guint timeout,
|
||||
gboolean allow_cached,
|
||||
gboolean is_raw,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
|
||||
@@ -306,6 +306,7 @@ cdma_connect_context_dial (DetailedConnectContext *ctx)
|
||||
command,
|
||||
90,
|
||||
FALSE,
|
||||
FALSE,
|
||||
NULL,
|
||||
(GAsyncReadyCallback)dial_cdma_ready,
|
||||
ctx);
|
||||
@@ -392,6 +393,7 @@ current_rm_protocol_ready (MMBaseModem *self,
|
||||
command,
|
||||
3,
|
||||
FALSE,
|
||||
FALSE,
|
||||
NULL,
|
||||
(GAsyncReadyCallback)set_rm_protocol_ready,
|
||||
ctx);
|
||||
@@ -444,6 +446,7 @@ connect_cdma (MMBroadbandBearer *self,
|
||||
"+CRM?",
|
||||
3,
|
||||
FALSE,
|
||||
FALSE, /* raw */
|
||||
NULL, /* cancellable */
|
||||
(GAsyncReadyCallback)current_rm_protocol_ready,
|
||||
ctx);
|
||||
@@ -584,6 +587,7 @@ atd_ready (MMBaseModem *modem,
|
||||
"+CEER",
|
||||
3,
|
||||
FALSE,
|
||||
FALSE, /* raw */
|
||||
NULL, /* cancellable */
|
||||
(GAsyncReadyCallback)extended_error_ready,
|
||||
ctx);
|
||||
@@ -623,6 +627,7 @@ dial_3gpp (MMBroadbandBearer *self,
|
||||
command,
|
||||
60,
|
||||
FALSE,
|
||||
FALSE, /* raw */
|
||||
NULL, /* cancellable */
|
||||
(GAsyncReadyCallback)atd_ready,
|
||||
ctx);
|
||||
@@ -805,6 +810,7 @@ find_cid_ready (MMBaseModem *modem,
|
||||
command,
|
||||
3,
|
||||
FALSE,
|
||||
FALSE, /* raw */
|
||||
NULL, /* cancellable */
|
||||
(GAsyncReadyCallback)initialize_pdp_context_ready,
|
||||
ctx);
|
||||
@@ -1511,6 +1517,7 @@ primary_flash_3gpp_ready (MMSerialPort *port,
|
||||
ctx->cgact_command,
|
||||
3,
|
||||
FALSE,
|
||||
FALSE, /* raw */
|
||||
NULL, /* cancellable */
|
||||
(GAsyncReadyCallback)cgact_primary_ready,
|
||||
ctx);
|
||||
@@ -1577,6 +1584,7 @@ disconnect_3gpp (MMBroadbandBearer *self,
|
||||
ctx->cgact_command,
|
||||
3,
|
||||
FALSE,
|
||||
FALSE, /* raw */
|
||||
NULL, /* cancellable */
|
||||
(GAsyncReadyCallback)cgact_secondary_ready,
|
||||
ctx);
|
||||
@@ -1990,6 +1998,7 @@ interface_initialization_step (InitAsyncContext *ctx)
|
||||
"+CRM=?",
|
||||
3,
|
||||
TRUE, /* getting range, so reply can be cached */
|
||||
FALSE, /* raw */
|
||||
NULL, /* cancellable */
|
||||
(GAsyncReadyCallback)crm_range_ready,
|
||||
ctx);
|
||||
|
||||
@@ -1364,6 +1364,7 @@ signal_quality_cind (SignalQualityContext *ctx)
|
||||
"+CIND?",
|
||||
3,
|
||||
FALSE,
|
||||
FALSE, /* raw */
|
||||
NULL, /* cancellable */
|
||||
(GAsyncReadyCallback)signal_quality_cind_ready,
|
||||
ctx);
|
||||
@@ -1772,6 +1773,7 @@ run_unsolicited_events_setup (UnsolicitedEventsContext *ctx)
|
||||
ctx->command,
|
||||
3,
|
||||
FALSE,
|
||||
FALSE, /* raw */
|
||||
NULL, /* cancellable */
|
||||
(GAsyncReadyCallback)unsolicited_events_setup_ready,
|
||||
ctx);
|
||||
@@ -2881,6 +2883,7 @@ modem_3gpp_register_in_network (MMIfaceModem3gpp *self,
|
||||
command,
|
||||
120,
|
||||
FALSE,
|
||||
FALSE, /* raw */
|
||||
ctx->cancellable,
|
||||
(GAsyncReadyCallback)register_in_3gpp_network_ready,
|
||||
ctx);
|
||||
@@ -3317,6 +3320,7 @@ unsolicited_registration_events_sequence_ready (MMBroadbandModem *self,
|
||||
g_variant_get_string (command, NULL),
|
||||
3,
|
||||
FALSE,
|
||||
FALSE, /* raw */
|
||||
NULL, /* cancellable */
|
||||
(GAsyncReadyCallback)unsolicited_registration_events_sequence_ready,
|
||||
ctx);
|
||||
@@ -6366,12 +6370,12 @@ open_ports_initialization (MMBroadbandModem *self,
|
||||
mm_base_modem_at_command_full (MM_BASE_MODEM (self),
|
||||
ctx->primary,
|
||||
"E0", 3,
|
||||
FALSE, NULL, NULL, NULL);
|
||||
FALSE, FALSE, NULL, NULL, NULL);
|
||||
/* Try to get extended errors */
|
||||
mm_base_modem_at_command_full (MM_BASE_MODEM (self),
|
||||
ctx->primary,
|
||||
"+CMEE=1", 3,
|
||||
FALSE, NULL, NULL, NULL);
|
||||
FALSE, FALSE, NULL, NULL, NULL);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user