From d56fb241d6eb569acd54848d83d20d5bda3cf3cc Mon Sep 17 00:00:00 2001 From: Nishant Chaprana Date: Mon, 12 Oct 2020 14:42:00 +0530 Subject: [gdhcp/client] Reopen socket GIO channel when failed Change-Id: Ib63b6f194e67fc4d7cfc3f223afa064761dff578 Signed-off-by: Nishant Chaprana --- gdhcp/client.c | 8 ++++++++ packaging/connman.spec | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/gdhcp/client.c b/gdhcp/client.c index 22bbc8e2..2bdc6163 100755 --- a/gdhcp/client.c +++ b/gdhcp/client.c @@ -2324,6 +2324,14 @@ static gboolean listener_event(GIOChannel *channel, GIOCondition condition, if (condition & (G_IO_NVAL | G_IO_ERR | G_IO_HUP)) { dhcp_client->listener_watch = 0; +#if defined TIZEN_EXT + /* re-register event listener when socket failed */ + int retry_count = 0; + int ret = -1; + while (retry_count++ < GIO_SOCKET_RETRY_COUNT && ret < 0) + ret = switch_listening_mode(dhcp_client, + dhcp_client->type); +#endif /* defined TIZEN_EXT */ return FALSE; } diff --git a/packaging/connman.spec b/packaging/connman.spec index e108c84a..56cf4063 100644 --- a/packaging/connman.spec +++ b/packaging/connman.spec @@ -5,7 +5,7 @@ Name: connman Version: 1.37 -Release: 47 +Release: 48 License: GPL-2.0+ Summary: Connection Manager Url: http://connman.net -- cgit v1.2.3