summaryrefslogtreecommitdiff
path: root/tools/wispr.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2010-11-13 08:57:55 +0900
committerMarcel Holtmann <marcel@holtmann.org>2010-11-13 08:57:55 +0900
commit357f45e79a88d01d0a605d1e3dc50d729f047adf (patch)
tree2c8148d1fec763d9a960a973548ad8eda9efa3a8 /tools/wispr.c
parent8eeadd8e5cce3fcd851857bdf1ff649a3284b4cd (diff)
downloadconnman-357f45e79a88d01d0a605d1e3dc50d729f047adf.tar.gz
connman-357f45e79a88d01d0a605d1e3dc50d729f047adf.tar.bz2
connman-357f45e79a88d01d0a605d1e3dc50d729f047adf.zip
Show WISPr abort login URL if present
Diffstat (limited to 'tools/wispr.c')
-rw-r--r--tools/wispr.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/wispr.c b/tools/wispr.c
index 4b083cf7..bfbdeb4c 100644
--- a/tools/wispr.c
+++ b/tools/wispr.c
@@ -103,6 +103,7 @@ struct wispr_msg {
int message_type;
int response_code;
char *login_url;
+ char *abort_login_url;
char *logoff_url;
char *access_procedure;
char *access_location;
@@ -120,6 +121,9 @@ static inline void wispr_msg_init(struct wispr_msg *msg)
g_free(msg->login_url);
msg->login_url = NULL;
+ g_free(msg->abort_login_url);
+ msg->abort_login_url = NULL;
+
g_free(msg->logoff_url);
msg->logoff_url = NULL;
@@ -231,6 +235,8 @@ static void text_handler(GMarkupParseContext *context,
msg->login_url = g_strdup(text);
break;
case WISPR_ELEMENT_ABORT_LOGIN_URL:
+ g_free(msg->abort_login_url);
+ msg->abort_login_url = g_strdup(text);
break;
case WISPR_ELEMENT_MESSAGE_TYPE:
msg->message_type = atoi(text);
@@ -500,6 +506,8 @@ static gboolean wispr_result(GWebResult *result, gpointer user_data)
printf("Location name: %s\n", wispr->msg.location_name);
if (wispr->msg.login_url != NULL)
printf("Login URL: %s\n", wispr->msg.login_url);
+ if (wispr->msg.abort_login_url != NULL)
+ printf("Abort login URL: %s\n", wispr->msg.abort_login_url);
if (wispr->msg.logoff_url != NULL)
printf("Logoff URL: %s\n", wispr->msg.logoff_url);
printf("\n");