diff options
author | Dan Williams <dcbw@redhat.com> | 2010-04-29 18:57:49 -0700 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2010-04-29 18:57:49 -0700 |
commit | fbfb7f895362331532e9cc4d7f02c8ffcf6b061e (patch) | |
tree | 3168a056fc672a2c89687d1abcb39b4a7a060bc0 | |
parent | 1864d8da0766e615c37a13f30bcacb72d381aa69 (diff) |
novatel: let generic CDMA class handle signal strength while connected
Instead of returning an unhelpful error when there isn't a second
AT port (which there never will be for Novatel CDMA devices) we should
let the superclass handle the request.
-rw-r--r-- | plugins/mm-modem-novatel-cdma.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/plugins/mm-modem-novatel-cdma.c b/plugins/mm-modem-novatel-cdma.c index bf747d1a..64ee15f2 100644 --- a/plugins/mm-modem-novatel-cdma.c +++ b/plugins/mm-modem-novatel-cdma.c @@ -143,15 +143,18 @@ get_signal_quality (MMModemCdma *modem, { MMCallbackInfo *info; MMAtSerialPort *port; + MMModemCdma *parent_iface; - info = mm_callback_info_uint_new (MM_MODEM (modem), callback, user_data); - - port = mm_generic_cdma_get_best_at_port (MM_GENERIC_CDMA (modem), &info->error); + port = mm_generic_cdma_get_best_at_port (MM_GENERIC_CDMA (modem), NULL); if (!port) { - mm_callback_info_schedule (info); + /* Let the superclass handle it */ + parent_iface = g_type_interface_peek_parent (MM_MODEM_CDMA_GET_INTERFACE (modem)); + parent_iface->get_signal_quality (MM_MODEM_CDMA (modem), callback, user_data); return; } + info = mm_callback_info_uint_new (MM_MODEM (modem), callback, user_data); + /* Many Novatel CDMA cards don't report CSQ in standard 0 - 31 and the CSQ * reply doesn't appear to be in positive dBm either; instead try the custom * Novatel command for it. |