sierra: fix time check warnings for modems that don't support time
'result' may be NULL even if no error is set. Errors aren't set because we want to continue the !TIME/!SYSTIME sequence regardless of errors, so we can figure out which command the modem supports. Trying to get a uint32 out of a NULL GVariant makes glib complain, and it's wrong, so don't do that.
This commit is contained in:
@@ -1337,7 +1337,7 @@ modem_time_check_ready (MMBaseModem *self,
|
|||||||
g_simple_async_result_set_op_res_gboolean (simple, FALSE);
|
g_simple_async_result_set_op_res_gboolean (simple, FALSE);
|
||||||
|
|
||||||
result = mm_base_modem_at_sequence_finish (self, res, NULL, &error);
|
result = mm_base_modem_at_sequence_finish (self, res, NULL, &error);
|
||||||
if (!error) {
|
if (!error && result) {
|
||||||
MMBroadbandModemSierra *sierra = MM_BROADBAND_MODEM_SIERRA (self);
|
MMBroadbandModemSierra *sierra = MM_BROADBAND_MODEM_SIERRA (self);
|
||||||
|
|
||||||
sierra->priv->time_method = g_variant_get_uint32 (result);
|
sierra->priv->time_method = g_variant_get_uint32 (result);
|
||||||
|
Reference in New Issue
Block a user