From patchwork Tue May 26 20:47:32 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Greear X-Patchwork-Id: 476734 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from maxx.maxx.shmoo.com (maxx.shmoo.com [205.134.188.171]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 338AC14029C for ; Wed, 27 May 2015 06:47:53 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id B46C417C05A; Tue, 26 May 2015 16:47:50 -0400 (EDT) X-Virus-Scanned: amavisd-new at maxx.shmoo.com Received: from maxx.maxx.shmoo.com ([127.0.0.1]) by localhost (maxx.shmoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HIjdpNxN-bFN; Tue, 26 May 2015 16:47:50 -0400 (EDT) Received: from maxx.shmoo.com (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 682B717C0A2; Tue, 26 May 2015 16:47:45 -0400 (EDT) X-Original-To: mailman-post+hostap@maxx.shmoo.com Delivered-To: mailman-post+hostap@maxx.shmoo.com Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 351B517C140 for ; Tue, 26 May 2015 16:47:44 -0400 (EDT) X-Virus-Scanned: amavisd-new at maxx.shmoo.com Received: from maxx.maxx.shmoo.com ([127.0.0.1]) by localhost (maxx.shmoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tf307ZPxNe43 for ; Tue, 26 May 2015 16:47:38 -0400 (EDT) Received: from mail2.candelatech.com (mail2.candelatech.com [208.74.158.173]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 5DCF917C05A for ; Tue, 26 May 2015 16:47:38 -0400 (EDT) Received: from localhost.localdomain (unknown [50.251.239.81]) by mail2.candelatech.com (Postfix) with ESMTP id 1F085409E08; Tue, 26 May 2015 13:47:37 -0700 (PDT) From: greearb@candelatech.com To: hostap@lists.shmoo.com Subject: [PATCH 1/3] spp-client: Warn user if xml file cannot be found. Date: Tue, 26 May 2015 16:47:32 -0400 Message-Id: <1432673254-1209-1-git-send-email-greearb@candelatech.com> X-Mailer: git-send-email 1.9.3 Cc: j@w1.fi, Ben Greear X-BeenThere: hostap@lists.shmoo.com X-Mailman-Version: 2.1.11 Precedence: list List-Id: HostAP Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: hostap-bounces@lists.shmoo.com Errors-To: hostap-bounces@lists.shmoo.com From: Ben Greear Otherwise, all you get is a cryptic xml validation error out of the spp-server. Signed-off-by: Ben Greear --- 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)