* if an attachment is empty don't send it to the server
authorWilfried Göesgens <willi@citadel.org>
Thu, 1 Oct 2009 21:12:28 +0000 (21:12 +0000)
committerWilfried Göesgens <willi@citadel.org>
Thu, 1 Oct 2009 21:12:28 +0000 (21:12 +0000)
webcit/messages.c

index b123b8c5a51ebc8de229ec891226e627a5662268..29eeef64fe45e8ea911f12753f0c666fc6a88b0e 100644 (file)
@@ -952,6 +952,8 @@ void post_mime_to_server(void) {
                it = GetNewHashPos(WCC->attachments, 0);
                while (GetNextHashPos(WCC->attachments, it, &len, &Key, &vAtt)) {
                        att = (wc_mime_attachment *)vAtt;
+                       if (att->length == 0)
+                               continue;
                        encoded_length = ((att->length * 150) / 100);
                        encoded = malloc(encoded_length);
                        if (encoded == NULL) break;