]> git.ipfire.org Git - thirdparty/HylaFAX.git/commitdiff
Bug 611: fix match() by quoting "$SUBSTR" and others
authorLee Howard <faxguy@howardsilvan.com>
Thu, 30 Dec 2004 18:38:02 +0000 (18:38 +0000)
committerLee Howard <faxguy@howardsilvan.com>
Thu, 30 Dec 2004 18:38:02 +0000 (18:38 +0000)
CHANGES
util/notify.sh.in

diff --git a/CHANGES b/CHANGES
index a534e5bef1738d0337c0f08a9b9364b188f40e30..afd0156e8ba929800af7ff53248f9c8c5ef65a09 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,7 @@
 
 Changelog for HylaFAX 4.2.1
 
+* fix NOTIFY_FAXMASTER within notify (30 Dec 2004)
 * improve tiff2pdf and use it more (29 Dec 2004)
 * fix 300 dpi support for some receivers (28 Dec 2004)
 * cause faxsetup to double-check and fix attachment encoding
index 995ec034e3e2dabcd1351fed4e93282f4fca1b45..c27ef56cbfda257ac49029554c71e50707a0c31a 100644 (file)
@@ -144,7 +144,7 @@ adjustNotifyFaxMaster()
                "done"|blocked|removed|killed)
                    NOTIFY_FAXMASTER=no;;
                 *)
-                    if (match "$faxstatus" "Busy signal|No answer|No carrier") ; then
+                    if (match "$faxstatus" "Busy signal") || (match "$faxstatus" "No answer") || (match "$faxstatus" "No carrier"); then
                         NOTIFY_FAXMASTER=no
                     else 
                         NOTIFY_FAXMASTER=yes
@@ -486,9 +486,9 @@ match()
 #  look for substring in fullsting.  substring can be a regular expression or plain string
 #  if the substring is found anywhere in the full string, true(0) is returned.
 {
-    FULLSTR=$1
-    SUBSTR=$2
-    echo $FULLSTR | $GREP -i $SUBSTR > /dev/null 2>&1
+    FULLSTR="$1"
+    SUBSTR="$2"
+    echo "$FULLSTR" | $GREP -i "$SUBSTR" > /dev/null 2>&1
     if [ $? -eq 0 ] ; then
         return 0
     else