mirror of git://git.sysmocom.de/ofono
novatel: Fix missing error handling for CFUN failure
This commit is contained in:
parent
1a23051d0f
commit
c3e78fc827
|
@ -23,7 +23,6 @@
|
|||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
@ -124,9 +123,18 @@ static GAtChat *open_device(struct ofono_modem *modem,
|
|||
static void cfun_enable(gboolean ok, GAtResult *result, gpointer user_data)
|
||||
{
|
||||
struct ofono_modem *modem = user_data;
|
||||
struct novatel_data *data = ofono_modem_get_data(modem);
|
||||
|
||||
DBG("");
|
||||
|
||||
if (!ok) {
|
||||
g_at_chat_unref(data->secondary);
|
||||
data->secondary = NULL;
|
||||
|
||||
g_at_chat_unref(data->primary);
|
||||
data->primary = NULL;
|
||||
}
|
||||
|
||||
ofono_modem_set_powered(modem, ok);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue