aboutsummaryrefslogtreecommitdiffstats
path: root/hs20
diff options
context:
space:
mode:
authorBen Greear <greearb@candelatech.com>2015-05-26 20:47:32 (GMT)
committerJouni Malinen <j@w1.fi>2015-05-27 08:55:43 (GMT)
commite4a43a9fa3ef0bd41ef9c64c7e371f8092ee964b (patch)
treed8103b8f7b36e18abaf41fe57b1e6ad6de7d16f6 /hs20
parentb4342ca4d8f21af51d4923ca15910d3211bfdc7e (diff)
downloadhostap-e4a43a9fa3ef0bd41ef9c64c7e371f8092ee964b.zip
hostap-e4a43a9fa3ef0bd41ef9c64c7e371f8092ee964b.tar.gz
hostap-e4a43a9fa3ef0bd41ef9c64c7e371f8092ee964b.tar.bz2
HS 2.0: spp-client: Warn user if xml file cannot be found
Otherwise, all you get is a cryptic XML validation error out of the SPP server. Signed-off-by: Ben Greear <greearb@candelatech.com>
Diffstat (limited to 'hs20')
-rw-r--r--hs20/client/spp_client.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/hs20/client/spp_client.c b/hs20/client/spp_client.c
index cc1a0bf..c619541 100644
--- a/hs20/client/spp_client.c
+++ b/hs20/client/spp_client.c
@@ -79,9 +79,14 @@ static void add_mo_container(struct xml_node_ctx *ctx, xml_namespace_t *ns,
xml_node_t *fnode, *tnds;
char *str;
+ errno = 0;
fnode = node_from_file(ctx, fname);
- if (!fnode)
+ if (!fnode) {
+ wpa_printf(MSG_ERROR,
+ "Failed to create XML node from file: %s, possible error: %s",
+ fname, strerror(errno));
return;
+ }
tnds = mo_to_tnds(ctx, fnode, 0, urn, "syncml:dmddf1.2");
xml_node_free(ctx, fnode);
if (!tnds)