mirror of git://git.sysmocom.de/ofono
dundee: Add dundee disconnect function
This commit is contained in:
parent
bd29b33083
commit
8eecae16c0
|
@ -270,11 +270,13 @@ err:
|
|||
device->pending = NULL;
|
||||
}
|
||||
|
||||
static void disconnect_callback(const struct dundee_error *error, void *data)
|
||||
void dundee_device_disconnect(const struct dundee_error *error,
|
||||
struct dundee_device *device)
|
||||
{
|
||||
struct dundee_device *device = data;
|
||||
if (device == NULL)
|
||||
return;
|
||||
|
||||
DBG("%p", device);
|
||||
DBG("%s", device->path);
|
||||
|
||||
g_at_chat_unref(device->chat);
|
||||
device->chat = NULL;
|
||||
|
@ -295,6 +297,12 @@ out:
|
|||
device->pending = NULL;
|
||||
}
|
||||
|
||||
static void disconnect_callback(const struct dundee_error *error, void *data)
|
||||
{
|
||||
struct dundee_device *device = data;
|
||||
dundee_device_disconnect(error, device);
|
||||
}
|
||||
|
||||
static gboolean ppp_connect_timeout(gpointer user_data)
|
||||
{
|
||||
struct dundee_device *device = user_data;
|
||||
|
|
|
@ -130,6 +130,9 @@ struct dundee_device *dundee_device_create(struct dundee_device_driver *d);
|
|||
int dundee_device_register(struct dundee_device *device);
|
||||
void dundee_device_unregister(struct dundee_device *device);
|
||||
|
||||
void dundee_device_disconnect(const struct dundee_error *error,
|
||||
struct dundee_device *device);
|
||||
|
||||
void dundee_device_set_data(struct dundee_device *device, void *data);
|
||||
void *dundee_device_get_data(struct dundee_device *device);
|
||||
|
||||
|
|
Loading…
Reference in New Issue