summaryrefslogtreecommitdiffstats
path: root/gisi
diff options
context:
space:
mode:
authorMika Liljeberg <mika.liljeberg@nokia.com>2010-11-10 14:22:29 +0200
committerAki Niemi <aki.niemi@nokia.com>2010-11-11 09:23:33 +0200
commit6fa4ee0237b8696db6459eb61375100c21bb7e40 (patch)
tree35b6b4f1384a778432d5abc346a61b10ccbf5744 /gisi
parent39823fee142013f20b5db60ea4b555098f93c978 (diff)
downloadofono-6fa4ee0237b8696db6459eb61375100c21bb7e40.tar.bz2
gisi: return NULL instead of asserting
Diffstat (limited to 'gisi')
-rw-r--r--gisi/pep.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gisi/pep.c b/gisi/pep.c
index f1ff5898..bea19024 100644
--- a/gisi/pep.c
+++ b/gisi/pep.c
@@ -148,6 +148,8 @@ unsigned g_isi_pep_get_ifindex(const GIsiPEP *pep)
char *g_isi_pep_get_ifname(const GIsiPEP *pep, char *ifname)
{
- unsigned ifi = g_isi_pep_get_ifindex(pep);
- return if_indextoname(ifi, ifname);
+ if (pep->gprs_fd == -1)
+ return NULL;
+
+ return if_indextoname(g_isi_pep_get_ifindex(pep), ifname);
}