Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
imap-send.c: imap_folder -> imap_server_conf.folder
author
Bernhard Reiter
<ockham@raz.or.at>
Tue, 19 Aug 2014 21:27:11 +0000
(23:27 +0200)
committer
Junio C Hamano
<gitster@pobox.com>
Wed, 20 Aug 2014 19:13:44 +0000
(12:13 -0700)
Rename the imap_folder variable to folder and make it a member
of struct imap_server_conf.
Signed-off-by: Bernhard Reiter <ockham@raz.or.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
imap-send.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
f9dc5d6
)
diff --git
a/imap-send.c
b/imap-send.c
index fb01a9c9a54a4423ccc3e2a6779692407ba2650d..05a02b51caaca56c11db5cd05c28a970d06ead8d 100644
(file)
--- a/
imap-send.c
+++ b/
imap-send.c
@@
-69,6
+69,7
@@
struct imap_server_conf {
char *tunnel;
char *host;
int port;
char *tunnel;
char *host;
int port;
+ char *folder;
char *user;
char *pass;
int use_ssl;
char *user;
char *pass;
int use_ssl;
@@
-82,6
+83,7
@@
static struct imap_server_conf server = {
NULL, /* tunnel */
NULL, /* host */
0, /* port */
NULL, /* tunnel */
NULL, /* host */
0, /* port */
+ NULL, /* folder */
NULL, /* user */
NULL, /* pass */
0, /* use_ssl */
NULL, /* user */
NULL, /* pass */
0, /* use_ssl */
@@
-1323,8
+1325,6
@@
static int split_msg(struct strbuf *all_msgs, struct strbuf *msg, int *ofs)
return 1;
}
return 1;
}
-static char *imap_folder;
-
static int git_imap_config(const char *key, const char *val, void *cb)
{
if (!skip_prefix(key, "imap.", &key))
static int git_imap_config(const char *key, const char *val, void *cb)
{
if (!skip_prefix(key, "imap.", &key))
@@
-1339,7
+1339,7
@@
static int git_imap_config(const char *key, const char *val, void *cb)
return config_error_nonbool(key);
if (!strcmp("folder", key)) {
return config_error_nonbool(key);
if (!strcmp("folder", key)) {
-
imap_
folder = xstrdup(val);
+
server.
folder = xstrdup(val);
} else if (!strcmp("host", key)) {
if (starts_with(val, "imap:"))
val += 5;
} else if (!strcmp("host", key)) {
if (starts_with(val, "imap:"))
val += 5;
@@
-1387,7
+1387,7
@@
int main(int argc, char **argv)
if (!server.port)
server.port = server.use_ssl ? 993 : 143;
if (!server.port)
server.port = server.use_ssl ? 993 : 143;
- if (!
imap_
folder) {
+ if (!
server.
folder) {
fprintf(stderr, "no imap store specified\n");
return 1;
}
fprintf(stderr, "no imap store specified\n");
return 1;
}
@@
-1424,7
+1424,7
@@
int main(int argc, char **argv)
}
fprintf(stderr, "sending %d message%s\n", total, (total != 1) ? "s" : "");
}
fprintf(stderr, "sending %d message%s\n", total, (total != 1) ? "s" : "");
- ctx->name =
imap_
folder;
+ ctx->name =
server.
folder;
while (1) {
unsigned percent = n * 100 / total;
while (1) {
unsigned percent = n * 100 / total;