/[imapfilter]/imapfilter/imapfilter.c
ViewVC logotype

Diff of /imapfilter/imapfilter.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by lefcha, Mon Aug 20 21:40:57 2001 UTC revision 1.5 by lefcha, Thu Aug 23 19:13:15 2001 UTC
# Line 11  Line 11 
11    
12    
13  int options;                    /* Program options. */  int options;                    /* Program options. */
14    char logfile[PATH_MAX];         /* Log file. */
15  extern int sock;  extern int sock;
16  extern account_data account;  int curacc;                     /* Current account being proccessed. */
17    extern int acccnt;
18    
19  /*  /*
20   * In the begining there was main()...   * In the begining there was main()...
# Line 24  int main(int argc, char **argv) Line 25  int main(int argc, char **argv)
25      int c;      int c;
26    
27      options = OPTION_DETAILS_NORMAL;      options = OPTION_DETAILS_NORMAL;
28        logfile[0] = 0;
     prepare_account();  
29    
30      while ((c = getopt(argc, argv, "c:hl:qstv")) != -1) {      while ((c = getopt(argc, argv, "c:hl:qstv")) != -1) {
31          switch (c) {          switch (c) {
# Line 37  int main(int argc, char **argv) Line 37  int main(int argc, char **argv)
37              exit(1);              exit(1);
38              break;              break;
39          case 'l':          case 'l':
40              strncpy(account.logfile, optarg, FILENAME_MAX);              strncpy(logfile, optarg, FILENAME_MAX);
41              break;              break;
42          case 'q':          case 'q':
43              options &= OPTION_DETAILS_CLEAR;              options &= OPTION_DETAILS_CLEAR;
# Line 63  int main(int argc, char **argv) Line 63  int main(int argc, char **argv)
63      if (read_config(config) || open_logfile())      if (read_config(config) || open_logfile())
64          exit(2);          exit(2);
65    
66      if (establish_connection()) {      for (curacc = 0; curacc <= acccnt; curacc++) {
67          close_logfile();          if (establish_connection()) {
68          exit(3);              close_logfile();
69      }              exit(3);
70            }
71    
72      clear_stream();          clear_stream();
73    
74  #ifdef DEBUG  #ifdef DEBUG
75      imap_noop();          imap_noop();
76  #endif  #endif
77    
78      imap_login();          imap_login();
79      imap_select();          imap_select();
80    
81      apply_filters();          apply_filters();
82    
83      imap_logout();          imap_logout();
84    
85      close_connection();          close_connection();
86        }
87    
88      close_logfile();      close_logfile();
89    

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

webmaster@linux.gr
ViewVC Help
Powered by ViewVC 1.1.26