22 |
*/ |
*/ |
23 |
int main(int argc, char *argv[]) |
int main(int argc, char *argv[]) |
24 |
{ |
{ |
25 |
int c; |
int c, r; |
26 |
char *confile = NULL; /* Configuration file. */ |
char *confile = NULL; /* Configuration file. */ |
27 |
account_t *ca; /* Current account. */ |
account_t *ca; /* Current account. */ |
28 |
mbox_t *cm; /* Current mailbox. */ |
mbox_t *cm; /* Current mailbox. */ |
70 |
close_logfile(); |
close_logfile(); |
71 |
exit(ERROR_NETWORK); |
exit(ERROR_NETWORK); |
72 |
} |
} |
73 |
if (greeting_response() || check_capabilities()) |
r = greeting_response(); |
74 |
|
|
75 |
|
if (r == RESPONSE_BYE || check_capabilities()) |
76 |
continue; |
continue; |
77 |
|
|
78 |
#ifdef DEBUG |
#ifdef DEBUG |
79 |
test(); |
test(); |
80 |
#endif |
#endif |
81 |
|
|
82 |
if (login(ca->username, ca->password)) |
if (r != RESPONSE_PREAUTH && login(ca->username, ca->password)) |
83 |
continue; |
continue; |
84 |
|
|
85 |
for (cm = ca->mboxes; cm; cm = cm->next) |
for (cm = ca->mboxes; cm; cm = cm->next) |