mirror of git://git.sysmocom.de/ofono
test-server: Fix crash when remote disconnects
If the remote side kills the connection when PPP is established, we should not try to resume the AT server.
This commit is contained in:
parent
afe16ba22a
commit
205d40db82
|
@ -137,6 +137,12 @@ static void ppp_disconnect(GAtPPPDisconnectReason reason, gpointer user)
|
|||
g_at_ppp_unref(ppp);
|
||||
ppp = NULL;
|
||||
|
||||
if (reason == G_AT_PPP_REASON_LINK_DEAD) {
|
||||
g_at_server_unref(server);
|
||||
server = NULL;
|
||||
return;
|
||||
}
|
||||
|
||||
g_at_server_resume(server);
|
||||
g_at_server_set_debug(server, server_debug, "Server");
|
||||
|
||||
|
|
Loading…
Reference in New Issue