Skip to content

Commit 899a05a

Browse files
AdityaGarg8gitster
authored andcommitted
imap-send: fix minor mistakes in the logs
Some minor mistakes have been found in the logs. Most of them include error messages starting with a capital letter, and ending with a period. Also, abbreviations like "IMAP" and "OK" should be in uppercase. Fix them. Signed-off-by: Aditya Garg <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent d6b4aa4 commit 899a05a

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

imap-send.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ static int ssl_socket_connect(struct imap_socket *sock UNUSED,
211211
const struct imap_server_conf *cfg UNUSED,
212212
int use_tls_only UNUSED)
213213
{
214-
fprintf(stderr, "SSL requested but SSL support not compiled in\n");
214+
fprintf(stderr, "SSL requested, but SSL support is not compiled in\n");
215215
return -1;
216216
}
217217

@@ -1026,7 +1026,7 @@ static int auth_cram_md5(struct imap_store *ctx, const char *prompt)
10261026
ret = socket_write(&ctx->imap->buf.sock, response, strlen(response));
10271027
if (ret != strlen(response)) {
10281028
free(response);
1029-
return error("IMAP error: sending response failed");
1029+
return error("IMAP error: sending CRAM-MD5 response failed");
10301030
}
10311031

10321032
free(response);
@@ -1166,7 +1166,7 @@ static struct imap_store *imap_open_store(struct imap_server_conf *srvc, const c
11661166
imap->buf.sock.fd[0] = tunnel.out;
11671167
imap->buf.sock.fd[1] = tunnel.in;
11681168

1169-
imap_info("ok\n");
1169+
imap_info("OK\n");
11701170
} else {
11711171
#ifndef NO_IPV6
11721172
struct addrinfo hints, *ai0, *ai;
@@ -1185,7 +1185,7 @@ static struct imap_store *imap_open_store(struct imap_server_conf *srvc, const c
11851185
fprintf(stderr, "getaddrinfo: %s\n", gai_strerror(gai));
11861186
goto bail;
11871187
}
1188-
imap_info("ok\n");
1188+
imap_info("OK\n");
11891189

11901190
for (ai0 = ai; ai; ai = ai->ai_next) {
11911191
char addr[NI_MAXHOST];
@@ -1223,7 +1223,7 @@ static struct imap_store *imap_open_store(struct imap_server_conf *srvc, const c
12231223
perror("gethostbyname");
12241224
goto bail;
12251225
}
1226-
imap_info("ok\n");
1226+
imap_info("OK\n");
12271227

12281228
addr.sin_addr.s_addr = *((int *) he->h_addr_list[0]);
12291229

@@ -1237,7 +1237,7 @@ static struct imap_store *imap_open_store(struct imap_server_conf *srvc, const c
12371237
}
12381238
#endif
12391239
if (s < 0) {
1240-
fputs("Error: unable to connect to server.\n", stderr);
1240+
fputs("error: unable to connect to server\n", stderr);
12411241
goto bail;
12421242
}
12431243

@@ -1249,7 +1249,7 @@ static struct imap_store *imap_open_store(struct imap_server_conf *srvc, const c
12491249
close(s);
12501250
goto bail;
12511251
}
1252-
imap_info("ok\n");
1252+
imap_info("OK\n");
12531253
}
12541254

12551255
/* read the greeting string */
@@ -1302,12 +1302,12 @@ static struct imap_store *imap_open_store(struct imap_server_conf *srvc, const c
13021302
if (try_auth_method(srvc, ctx, imap, "XOAUTH2", AUTH_XOAUTH2, auth_xoauth2))
13031303
goto bail;
13041304
} else {
1305-
fprintf(stderr, "Unknown authentication method:%s\n", srvc->host);
1305+
fprintf(stderr, "unknown authentication method:%s\n", srvc->host);
13061306
goto bail;
13071307
}
13081308
} else {
13091309
if (CAP(NOLOGIN)) {
1310-
fprintf(stderr, "Skipping account %s@%s, server forbids LOGIN\n",
1310+
fprintf(stderr, "skipping account %s@%s, server forbids LOGIN\n",
13111311
srvc->user, srvc->host);
13121312
goto bail;
13131313
}
@@ -1811,7 +1811,7 @@ int cmd_main(int argc, const char **argv)
18111811

18121812
if (!server.host) {
18131813
if (!server.tunnel) {
1814-
fprintf(stderr, "no imap host specified\n");
1814+
fprintf(stderr, "no IMAP host specified\n");
18151815
ret = 1;
18161816
goto out;
18171817
}
@@ -1831,7 +1831,7 @@ int cmd_main(int argc, const char **argv)
18311831
}
18321832

18331833
if (!server.folder) {
1834-
fprintf(stderr, "no imap store specified\n");
1834+
fprintf(stderr, "no IMAP store specified\n");
18351835
ret = 1;
18361836
goto out;
18371837
}
@@ -1851,7 +1851,7 @@ int cmd_main(int argc, const char **argv)
18511851

18521852
total = count_messages(&all_msgs);
18531853
if (!total) {
1854-
fprintf(stderr, "no messages to send\n");
1854+
fprintf(stderr, "no messages found to send\n");
18551855
ret = 1;
18561856
goto out;
18571857
}

0 commit comments

Comments
 (0)