imap-send: return with error if curl failed
curl_append_msgs_to_imap always returned 0, whether curl failed or not. Return a proper status so git imap-send will exit with an error code if something wrong happened. Signed-off-by: Nicolas Morey-Chaisemartin <nicolas@morey-chaisemartin.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Nicolas Morey-Chaisemartin committed
Sep 14, 2017 at 09:51 UTC
200bc38bf5a262dd01de9f30fd4e82d33b2da55f
1 file changed
+1
-1
imap-send.c
+1
-1
@@ -1490,7 +1490,7 @@ static int curl_append_msgs_to_imap(struct imap_server_conf *server,
1490
curl_easy_cleanup(curl);
1491
curl_global_cleanup();
1492
1493
- return 0;
1493
+ return res != CURLE_OK;
1494
}
1495
#endif
1496