From 357f45e79a88d01d0a605d1e3dc50d729f047adf Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sat, 13 Nov 2010 08:57:55 +0900 Subject: [PATCH] Show WISPr abort login URL if present --- tools/wispr.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/wispr.c b/tools/wispr.c index 4b083cf..bfbdeb4 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"); -- 2.7.4