summaryrefslogtreecommitdiffstats
path: root/gatchat/gatserver.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2010-04-12 17:48:20 -0700
committerMarcel Holtmann <marcel@holtmann.org>2010-04-12 17:48:20 -0700
commita977ecf260970358c6d8440a4ee6f6125f463777 (patch)
tree7ffa6a2298f1038847de62e1746af1f6fd8bf6df /gatchat/gatserver.c
parent5b229e60c91645dfdec717e7dfdb43478e9058b8 (diff)
downloadofono-a977ecf260970358c6d8440a4ee6f6125f463777.tar.bz2
Remove various GDestroyNotify function casting
Diffstat (limited to 'gatchat/gatserver.c')
-rw-r--r--gatchat/gatserver.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/gatchat/gatserver.c b/gatchat/gatserver.c
index b9d9e4f2..b5187496 100644
--- a/gatchat/gatserver.c
+++ b/gatchat/gatserver.c
@@ -1074,8 +1074,10 @@ static void g_at_server_cleanup(GAtServer *server)
server->channel = NULL;
}
-static void read_watcher_destroy_notify(GAtServer *server)
+static void read_watcher_destroy_notify(gpointer user_data)
{
+ GAtServer *server = user_data;
+
g_at_server_cleanup(server);
server->read_watch = 0;
@@ -1086,8 +1088,10 @@ static void read_watcher_destroy_notify(GAtServer *server)
g_free(server);
}
-static void write_watcher_destroy_notify(GAtServer *server)
+static void write_watcher_destroy_notify(gpointer user_data)
{
+ GAtServer *server = user_data;
+
server->write_watch = 0;
}
@@ -1100,7 +1104,7 @@ static void g_at_server_wakeup_writer(GAtServer *server)
G_PRIORITY_DEFAULT,
G_IO_OUT | G_IO_HUP | G_IO_ERR | G_IO_NVAL,
can_write_data, server,
- (GDestroyNotify)write_watcher_destroy_notify);
+ write_watcher_destroy_notify);
}
static void v250_settings_create(struct v250_settings *v250)
@@ -1175,7 +1179,7 @@ GAtServer *g_at_server_new(GIOChannel *io)
server->read_watch = g_io_add_watch_full(io, G_PRIORITY_DEFAULT,
G_IO_IN | G_IO_HUP | G_IO_ERR | G_IO_NVAL,
received_data, server,
- (GDestroyNotify)read_watcher_destroy_notify);
+ read_watcher_destroy_notify);
basic_command_register(server);