mirror of
https://github.com/sailfishos/ofono
synced 2025-12-02 07:31:04 +08:00
novatel: Fix missing error handling for CFUN failure
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user