1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 23:58:49 -05:00

imap: Added comments to imap_append()

This commit is contained in:
Steve Holme 2013-03-03 16:44:53 +00:00
parent e6b7dae947
commit 298f806d01

View File

@ -730,16 +730,18 @@ static CURLcode imap_append(struct connectdata *conn)
struct IMAP *imap = conn->data->state.proto.imap;
char *mailbox;
/* Check we know the size of the upload */
if(conn->data->set.infilesize < 0) {
failf(conn->data, "Cannot APPEND with unknown input file size\n");
return CURLE_UPLOAD_FAILED;
}
/* Make sure the mailbox is in the correct atom format */
mailbox = imap_atom(imap->mailbox);
if(!mailbox)
return CURLE_OUT_OF_MEMORY;
/* Send the APPEND command */
result = imap_sendf(conn, "APPEND %s (\\Seen) {%" FORMAT_OFF_T "}",
mailbox, conn->data->set.infilesize);