From: Mika Liljeberg Date: Wed, 10 Nov 2010 12:22:29 +0000 (+0200) Subject: gisi: return NULL instead of asserting X-Git-Tag: 0.36~42 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6fa4ee0237b8696db6459eb61375100c21bb7e40;p=platform%2Fupstream%2Fofono.git gisi: return NULL instead of asserting --- diff --git a/gisi/pep.c b/gisi/pep.c index f1ff589..bea1902 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); }