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>
This commit is contained in:
parent
b4342ca4d8
commit
e4a43a9fa3
1 changed files with 6 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue