]> git.ipfire.org Git - thirdparty/HylaFAX.git/commitdiff
Bug 541: fix error in clients when sender name contained only whitespace
authorLee Howard <faxguy@howardsilvan.com>
Sat, 8 May 2004 21:58:14 +0000 (21:58 +0000)
committerLee Howard <faxguy@howardsilvan.com>
Sat, 8 May 2004 21:58:14 +0000 (21:58 +0000)
         thanks to Marco Steinacher

util/SendFaxClient.c++

index cf9429a05498270e03e6d60628cb665d59b15482..f3a4cb5a9e59a497fcafef8d9c52b5dade8ede0f 100644 (file)
@@ -574,6 +574,11 @@ SendFaxClient::setupSenderIdentity(const fxStr& from, fxStr& emsg)
            senderName = from.head(l);
            l++, setBlankMailboxes(from.token(l, '>'));
        }
+       
+       // strip leading&trailing white space and quotes
+       senderName.remove(0, senderName.skip(0, " \t\""));
+       senderName.resize(senderName.skipR(senderName.length(), " \t\""));
+       
        if (senderName == "" && getNonBlankMailbox(senderName)) {
            /*
             * Mail address, but no "real name"; construct one from