From ffcbb251054e295a9a557f0ec1337b6eb8a9f63e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Denis-Courmont?= Date: Wed, 19 Aug 2009 17:04:27 +0300 Subject: [PATCH] gisi: warn if GIsiModem is missing rather than fail --- gisi/socket.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gisi/socket.c b/gisi/socket.c index bca89853..4373e9d5 100644 --- a/gisi/socket.c +++ b/gisi/socket.c @@ -54,6 +54,9 @@ GIOChannel *phonet_new(GIsiModem *modem, uint8_t resource) fcntl(fd, F_SETFD, FD_CLOEXEC); /* Use blocking mode on purpose. */ + if (ifi == 0) + g_warning("Unspecified GIsiModem!"); + else if (if_indextoname(ifi, buf) == NULL || setsockopt(fd, SOL_SOCKET, SO_BINDTODEVICE, buf, IF_NAMESIZE)) goto error;