diff options
author | Aleksander Morgado <aleksander@lanedo.com> | 2011-04-06 17:08:06 +0200 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2011-04-06 16:58:13 -0500 |
commit | cc5fcd195a26b0b09be8e47d95e54a92f78c8806 (patch) | |
tree | 5db3b70d2928ba211f15b317e9217ea44502f5da /src | |
parent | 49150ca3a69d8a65c63fc691ffcaabd15f49818d (diff) |
modem-base: allow NULL ports in get_card_info() if port_error given
So that cached values can be returned if querying while the port is connected.
Diffstat (limited to 'src')
-rw-r--r-- | src/mm-modem-base.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mm-modem-base.c b/src/mm-modem-base.c index ee5e1c86..9afc1bf9 100644 --- a/src/mm-modem-base.c +++ b/src/mm-modem-base.c @@ -526,12 +526,12 @@ mm_modem_base_get_card_info (MMModemBase *self, MMModemBasePrivate *priv; MMCallbackInfo *info; gboolean cached = FALSE; - GError *error = port_error; + GError *error = NULL; g_return_if_fail (self != NULL); g_return_if_fail (MM_IS_MODEM_BASE (self)); - g_return_if_fail (port != NULL); - g_return_if_fail (MM_IS_AT_SERIAL_PORT (port)); + /* Either we get a proper AT port, or we get a port_error */ + g_return_if_fail ((port != NULL && MM_IS_AT_SERIAL_PORT (port)) || port_error != NULL); g_return_if_fail (callback != NULL); priv = MM_MODEM_BASE_GET_PRIVATE (self); |