diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-08-09 13:05:47 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-08-09 13:05:47 -0700 |
commit | 0d0ba03a18a9c6cbc3d55c1b6834b9c3824f823f (patch) | |
tree | 3266384afc1dc4717f49b1bd77f9ab734cacf8a0 /imap-send.c | |
parent | d7d1c79cec6601db3a470e59240aa6ffab8b1405 (diff) | |
parent | 497d9c343902591e98a6612385d529816420ea94 (diff) | |
download | git-0d0ba03a18a9c6cbc3d55c1b6834b9c3824f823f.tar.gz git-0d0ba03a18a9c6cbc3d55c1b6834b9c3824f823f.tar.xz |
Merge branch 'maint'
* maint:
gitweb: clarify search results page when no matching commit found
Documentation: add a FILES section for show-ref
Makefile: add missing dependency on http.h
Makefile: add missing dependencies on url.h
Documentation/git-log: Clarify --full-diff
git-rebase: fix typo when parsing --force-rebase
imap-send: Fix sprintf usage
prune: allow --dry-run for -n and --verbose for -v
notes: allow --dry-run for -n and --verbose for -v
Document -B<n>[/<m>], -M<n> and -C<n> variants of -B, -M and -C
Documentation: cite git-am from git-apply
t7003: fix subdirectory-filter test
Allow "check-ref-format --branch" from subdirectory
check-ref-format: handle subcommands in separate functions
pretty-options.txt: match --format's documentation with implementation.
Diffstat (limited to 'imap-send.c')
-rw-r--r-- | imap-send.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/imap-send.c b/imap-send.c index 1a577a0a0..71506a8dd 100644 --- a/imap-send.c +++ b/imap-send.c @@ -543,9 +543,13 @@ static struct imap_cmd *v_issue_imap_cmd(struct imap_store *ctx, while (imap->literal_pending) get_cmd_result(ctx, NULL); - bufl = nfsnprintf(buf, sizeof(buf), cmd->cb.data ? CAP(LITERALPLUS) ? - "%d %s{%d+}\r\n" : "%d %s{%d}\r\n" : "%d %s\r\n", - cmd->tag, cmd->cmd, cmd->cb.dlen); + if (!cmd->cb.data) + bufl = nfsnprintf(buf, sizeof(buf), "%d %s\r\n", cmd->tag, cmd->cmd); + else + bufl = nfsnprintf(buf, sizeof(buf), "%d %s{%d%s}\r\n", + cmd->tag, cmd->cmd, cmd->cb.dlen, + CAP(LITERALPLUS) ? "+" : ""); + if (Verbose) { if (imap->num_in_progress) printf("(%d in progress) ", imap->num_in_progress); @@ -1086,7 +1090,7 @@ static struct store *imap_open_store(struct imap_server_conf *srvc) int gai; char portstr[6]; - snprintf(portstr, sizeof(portstr), "%hu", srvc->port); + snprintf(portstr, sizeof(portstr), "%d", srvc->port); memset(&hints, 0, sizeof(hints)); hints.ai_socktype = SOCK_STREAM; |