summaryrefslogtreecommitdiffstats
path: root/gatchat/gatppp.c
diff options
context:
space:
mode:
Diffstat (limited to 'gatchat/gatppp.c')
-rw-r--r--gatchat/gatppp.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/gatchat/gatppp.c b/gatchat/gatppp.c
index 7afff531..556387ae 100644
--- a/gatchat/gatppp.c
+++ b/gatchat/gatppp.c
@@ -59,11 +59,13 @@ void g_at_ppp_set_connect_function(GAtPPP *ppp, GAtPPPConnectFunc func,
ppp->connect_data = user_data;
}
-void g_at_ppp_set_disconnect_function(GAtPPP *ppp,
- GAtPPPDisconnectFunc callback,
- gpointer user_data)
+void g_at_ppp_set_disconnect_function(GAtPPP *ppp, GAtDisconnectFunc func,
+ gpointer user_data)
{
- ppp->disconnect_cb = callback;
+ if (func == NULL)
+ return;
+
+ ppp->disconnect_cb = func;
ppp->disconnect_data = user_data;
}