diff options
author | Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com> | 2011-11-25 13:03:04 +0200 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2011-11-28 15:55:28 +0100 |
commit | ac9b140f8dd99d5aa13dae02f6903a4b7f9cfc4c (patch) | |
tree | 6b431505d1831af560d62d80fe810ee1259c0776 /src/wispr.c | |
parent | efad0f971ef1ae6417976051d8ee1c8a5a592f56 (diff) | |
download | connman-ac9b140f8dd99d5aa13dae02f6903a4b7f9cfc4c.tar.gz connman-ac9b140f8dd99d5aa13dae02f6903a4b7f9cfc4c.tar.bz2 connman-ac9b140f8dd99d5aa13dae02f6903a4b7f9cfc4c.zip |
wispr: Use the right interface index with gweb
Diffstat (limited to 'src/wispr.c')
-rw-r--r-- | src/wispr.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/wispr.c b/src/wispr.c index 0e05f9d5..64b90708 100644 --- a/src/wispr.c +++ b/src/wispr.c @@ -627,6 +627,7 @@ static int wispr_portal_detect(struct connman_wispr_portal_context *wp_context) { enum connman_service_type service_type; char *interface = NULL; + int if_index; int err = 0; DBG("wispr/portal context %p", wp_context); @@ -655,7 +656,11 @@ static int wispr_portal_detect(struct connman_wispr_portal_context *wp_context) DBG("interface %s", interface); - wp_context->web = g_web_new(0); + if_index = connman_inet_ifindex(interface); + if (if_index < 0) + return -EINVAL; + + wp_context->web = g_web_new(if_index); if (wp_context->web == NULL) { err = -ENOMEM; goto done; |