[PATCH 1/3] spp-client: Warn user if xml file cannot be found.
greearb at candelatech.com
greearb
Tue May 26 13:47:32 PDT 2015
From: Ben Greear <greearb at candelatech.com>
Otherwise, all you get is a cryptic xml validation error out
of the spp-server.
Signed-off-by: Ben Greear <greearb at candelatech.com>
---
hs20/client/spp_client.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/hs20/client/spp_client.c b/hs20/client/spp_client.c
index cc1a0bf..4b16381 100644
--- a/hs20/client/spp_client.c
+++ b/hs20/client/spp_client.c
@@ -79,9 +79,13 @@ 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\n",
+ fname, strerror(errno));
return;
+ }
tnds = mo_to_tnds(ctx, fnode, 0, urn, "syncml:dmddf1.2");
xml_node_free(ctx, fnode);
if (!tnds)
--
1.9.3
More information about the Hostap
mailing list