projects
/
framework
/
connectivity
/
connman.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8eeadd8
)
Show WISPr abort login URL if present
author
Marcel Holtmann
<marcel@holtmann.org>
Fri, 12 Nov 2010 23:57:55 +0000
(08:57 +0900)
committer
Marcel Holtmann
<marcel@holtmann.org>
Fri, 12 Nov 2010 23:57:55 +0000
(08:57 +0900)
tools/wispr.c
patch
|
blob
|
history
diff --git
a/tools/wispr.c
b/tools/wispr.c
index
4b083cf
..
bfbdeb4
100644
(file)
--- a/
tools/wispr.c
+++ b/
tools/wispr.c
@@
-103,6
+103,7
@@
struct wispr_msg {
int message_type;
int response_code;
char *login_url;
int message_type;
int response_code;
char *login_url;
+ char *abort_login_url;
char *logoff_url;
char *access_procedure;
char *access_location;
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->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;
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:
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);
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);
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");
if (wispr->msg.logoff_url != NULL)
printf("Logoff URL: %s\n", wispr->msg.logoff_url);
printf("\n");