]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
HS 2.0: spp-client: Warn user if xml file cannot be found
authorBen Greear <greearb@candelatech.com>
Tue, 26 May 2015 20:47:32 +0000 (16:47 -0400)
committerJouni Malinen <j@w1.fi>
Wed, 27 May 2015 08:55:43 +0000 (11:55 +0300)
Otherwise, all you get is a cryptic XML validation error out
of the SPP server.

Signed-off-by: Ben Greear <greearb@candelatech.com>
hs20/client/spp_client.c

index cc1a0bfa967b772a64598bd56248a96e5c42ac39..c619541ae28673c48c358550b048486d0e6b81dd 100644 (file)
@@ -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)