diff options
author | Dan Williams <dcbw@redhat.com> | 2010-01-19 03:16:34 -0800 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2010-01-19 03:18:10 -0800 |
commit | 50ad39b28e61adb3d9da178c47e41100f554adeb (patch) | |
tree | 0dad5f389015412d5f6c0ecd02fd6ec6d486e9c4 /src/mm-modem.h | |
parent | 73e10c77d37791ed4a1f51ee8c1007600ef24bde (diff) |
core: protect against modem removal in critical callbacks (rh #553953)
There are more places to handle, but these are the most critical. If
the modem is removed while a command is in-progress, the mm-callback-info
code will set info->modem to NULL. Make sure we check for that in
callbacks and return a reasonable error. Previous code would just
blindly forge ahead and die on a null dereference.
Diffstat (limited to 'src/mm-modem.h')
-rw-r--r-- | src/mm-modem.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mm-modem.h b/src/mm-modem.h index b59525e2..e8dd7ea2 100644 --- a/src/mm-modem.h +++ b/src/mm-modem.h @@ -213,5 +213,7 @@ void mm_modem_set_state (MMModem *self, MMModemState new_state, MMModemStateReason reason); +GError *mm_modem_check_removed (MMModem *self, const GError *error); + #endif /* MM_MODEM_H */ |