From: Marcel Holtmann Date: Fri, 12 Nov 2010 23:57:55 +0000 (+0900) Subject: Show WISPr abort login URL if present X-Git-Tag: 2.0_alpha~2127 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=357f45e79a88d01d0a605d1e3dc50d729f047adf;p=framework%2Fconnectivity%2Fconnman.git Show WISPr abort login URL if present --- 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");