HS 2.0R2: Add more debugging messages to hs20-osu-client
Helps to figure out why some errors happen. Signed-off-by: Ben Greear <greearb@candelatech.com>
This commit is contained in:
parent
93c2e60b36
commit
97c9991c5b
2 changed files with 23 additions and 8 deletions
|
@ -547,8 +547,9 @@ int hs20_add_pps_mo(struct hs20_osu_client *ctx, const char *uri,
|
||||||
wpa_printf(MSG_INFO, "SP FQDN: %s", fqdn);
|
wpa_printf(MSG_INFO, "SP FQDN: %s", fqdn);
|
||||||
|
|
||||||
if (!server_dnsname_suffix_match(ctx, fqdn)) {
|
if (!server_dnsname_suffix_match(ctx, fqdn)) {
|
||||||
wpa_printf(MSG_INFO, "FQDN '%s' for new PPS MO did not have suffix match with server's dNSName values",
|
wpa_printf(MSG_INFO,
|
||||||
fqdn);
|
"FQDN '%s' for new PPS MO did not have suffix match with server's dNSName values, count: %d",
|
||||||
|
fqdn, (int) ctx->server_dnsname_count);
|
||||||
write_result(ctx, "FQDN '%s' for new PPS MO did not have suffix match with server's dNSName values",
|
write_result(ctx, "FQDN '%s' for new PPS MO did not have suffix match with server's dNSName values",
|
||||||
fqdn);
|
fqdn);
|
||||||
free(fqdn);
|
free(fqdn);
|
||||||
|
@ -2094,10 +2095,14 @@ static int osu_connect(struct hs20_osu_client *ctx, const char *bssid,
|
||||||
}
|
}
|
||||||
|
|
||||||
ctx->no_reconnect = 1;
|
ctx->no_reconnect = 1;
|
||||||
if (methods & 0x02)
|
if (methods & 0x02) {
|
||||||
|
wpa_printf(MSG_DEBUG, "Calling cmd_prov from osu_connect");
|
||||||
res = cmd_prov(ctx, url);
|
res = cmd_prov(ctx, url);
|
||||||
else if (methods & 0x01)
|
} else if (methods & 0x01) {
|
||||||
|
wpa_printf(MSG_DEBUG,
|
||||||
|
"Calling cmd_oma_dm_prov from osu_connect");
|
||||||
res = cmd_oma_dm_prov(ctx, url);
|
res = cmd_oma_dm_prov(ctx, url);
|
||||||
|
}
|
||||||
|
|
||||||
wpa_printf(MSG_INFO, "Remove OSU network connection");
|
wpa_printf(MSG_INFO, "Remove OSU network connection");
|
||||||
write_summary(ctx, "Remove OSU network connection");
|
write_summary(ctx, "Remove OSU network connection");
|
||||||
|
@ -2290,12 +2295,19 @@ selected:
|
||||||
}
|
}
|
||||||
|
|
||||||
if (connect == 2) {
|
if (connect == 2) {
|
||||||
if (last->methods & 0x02)
|
if (last->methods & 0x02) {
|
||||||
|
wpa_printf(MSG_DEBUG,
|
||||||
|
"Calling cmd_prov from cmd_osu_select");
|
||||||
ret = cmd_prov(ctx, last->url);
|
ret = cmd_prov(ctx, last->url);
|
||||||
else if (last->methods & 0x01)
|
} else if (last->methods & 0x01) {
|
||||||
|
wpa_printf(MSG_DEBUG,
|
||||||
|
"Calling cmd_oma_dm_prov from cmd_osu_select");
|
||||||
ret = cmd_oma_dm_prov(ctx, last->url);
|
ret = cmd_oma_dm_prov(ctx, last->url);
|
||||||
else
|
} else {
|
||||||
|
wpa_printf(MSG_DEBUG,
|
||||||
|
"No supported OSU provisioning method");
|
||||||
ret = -1;
|
ret = -1;
|
||||||
|
}
|
||||||
} else if (connect)
|
} else if (connect)
|
||||||
ret = osu_connect(ctx, last->bssid, last->osu_ssid,
|
ret = osu_connect(ctx, last->bssid, last->osu_ssid,
|
||||||
last->url, last->methods,
|
last->url, last->methods,
|
||||||
|
@ -3125,6 +3137,7 @@ int main(int argc, char *argv[])
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
ctx.ca_fname = argv[optind + 2];
|
ctx.ca_fname = argv[optind + 2];
|
||||||
|
wpa_printf(MSG_DEBUG, "Calling cmd_prov from main");
|
||||||
cmd_prov(&ctx, argv[optind + 1]);
|
cmd_prov(&ctx, argv[optind + 1]);
|
||||||
} else if (strcmp(argv[optind], "sim_prov") == 0) {
|
} else if (strcmp(argv[optind], "sim_prov") == 0) {
|
||||||
if (argc - optind < 2) {
|
if (argc - optind < 2) {
|
||||||
|
|
|
@ -952,7 +952,9 @@ int cmd_prov(struct hs20_osu_client *ctx, const char *url)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
wpa_printf(MSG_INFO, "Credential provisioning requested");
|
wpa_printf(MSG_INFO,
|
||||||
|
"Credential provisioning requested - URL: %s ca_fname: %s",
|
||||||
|
url, ctx->ca_fname ? ctx->ca_fname : "N/A");
|
||||||
|
|
||||||
os_free(ctx->server_url);
|
os_free(ctx->server_url);
|
||||||
ctx->server_url = os_strdup(url);
|
ctx->server_url = os_strdup(url);
|
||||||
|
|
Loading…
Reference in a new issue