Fix two missed return values in compose_write_to_file() from commit e9f610a4f.
authorAndrej Kacian <ticho@claws-mail.org>
Wed, 18 Apr 2018 16:19:28 +0000 (18:19 +0200)
committerAndrej Kacian <ticho@claws-mail.org>
Wed, 18 Apr 2018 16:19:28 +0000 (18:19 +0200)
Thanks to wwp for finding the issue!

src/compose.c

index 97d53bd..8fb4891 100644 (file)
@@ -5845,7 +5845,7 @@ static gint compose_write_to_file(Compose *compose, FILE *fp, gint action, gbool
                g_node_append(mimemsg->node, mimempart->node);
 
                if (compose_add_attachments(compose, mimempart) < 0)
-                       return -1;
+                       return COMPOSE_QUEUE_ERROR_NO_MSG;
        } else
                g_node_append(mimemsg->node, mimetext->node);
 
@@ -5872,7 +5872,7 @@ static gint compose_write_to_file(Compose *compose, FILE *fp, gint action, gbool
                        compose->account, from_addr)) {
                        g_free(from_name);
                        g_free(from_addr);
-                       return -2;
+                       return COMPOSE_QUEUE_ERROR_SIGNING_FAILED;
        }
        g_free(from_name);
        g_free(from_addr);