]> git.ipfire.org Git - thirdparty/HylaFAX.git/commitdiff
Class2: Fix hangup cause handling
authorAidan Van Dyk <aidan@ifax.com>
Mon, 30 Aug 2010 17:51:42 +0000 (13:51 -0400)
committerAidan Van Dyk <mountie@cherry.home.highrise.ca>
Wed, 29 Jun 2011 13:31:49 +0000 (09:31 -0400)
This makes sur that errors on reception in Class2 aren't "missed", as seen in:
Date: Mon, 30 Aug 2010 16:20:51 +0200
From: Giuseppe Sacco <giuseppe@eppesuigoccas.homedns.org>
Subject: [hylafax-users] COMREC error (code 72), Normal and proper end of connection,
To: hylafax-users@hylafax.org
Message-ID: <1283178051.5043.21.camel@scarafaggio>

faxd/Class2.c++

index 6a1557bd88265c5b4a1080f834355893f90d2988..9bd312d3b778b93f8e3ed5382bdd93e4f5f64a99 100644 (file)
@@ -851,9 +851,10 @@ const Status& Class2Modem::hangupStatus (const char* code)
     for (u_int i = 0; i < NCODES; i++) {
        const HangupCode& c = hangupCodes[i];
        if ((c.code[1] != NULL && strcasecmp(code, c.code[1]) == 0) ||
-           (c.code[2] != NULL && strcasecmp(code, c.code[2]) == 0))
+           (c.code[2] != NULL && strcasecmp(code, c.code[2]) == 0)) {
            s = Status(c.status, c.message);
            return s;
+       }
     }
     s = Status(210, "Unknown hangup code");
     return s;