freecwmp
[Top] [All Lists]

[PATCH] fix "method not implemented" error generation

To: freecwmp@linux-mips.org
Subject: [PATCH] fix "method not implemented" error generation
From: Jonas Gorski <jonas.gorski@gmail.com>
Date: Mon, 5 Nov 2012 19:11:06 +0100
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:x-mailer; bh=sf5KnvMmG1w+RQWh1LprtICEuzRF1k+3AKAKkUvCJx4=; b=iRyTQl29ZNlWeClCyjHsHXO6Sw4mnlGXn7o0ArgAkkSOlwWlAwXRSXWDUP70TTrTKC 2Ogfqd3qy05jIbcK4sXZgU1GoytWPN7KW0br4q62vksTW85cmpMiI/GAsLPFIY7PoSqf x9dyBCvfU9egFY2IIx0fIT1V6c4YVVvL/qSTeRwH/nUoZQbQQK9wYjF7RrsqM3683M9A xKYQsmv4PEiQJ/Y9RtOFPGk/oi9JQq07RT9MIIMPbZ8hpBPHcJ6x7hasDg5F61t0SBvd zDpMpGD+53h4+EobeVOPK33WZRY0eIsYdZkge5AsjblJ2di63Tqt0S3RhSZrZomIUBRD WMBQ==
Original-recipient: rfc822;freecwmp@linux-mips.org
Sender: freecwmp-bounce@linux-mips.org
The check for error message generation success was inverted, causing
the "method not implemented" errors not being sent and freecwmp thought
parsing failed.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
---
 src/xml.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/xml.c b/src/xml.c
index 22cfbcd..9fa036b 100644
--- a/src/xml.c
+++ b/src/xml.c
@@ -509,7 +509,7 @@ find_method:
                if (asprintf(&fault_message, "%s not supported", c) == -1)
                        goto error;
 
-               if (!xml_create_generic_fault_message(b, true, "9000", 
fault_message)) {
+               if (xml_create_generic_fault_message(b, true, "9000", 
fault_message)) {
                        FREE(fault_message);
                        goto error;
                }
-- 
1.7.10.4


<Prev in Thread] Current Thread [Next in Thread>