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

Diff of /imapfilter/account.c

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

revision 1.3.2.2 by lefcha, Fri Aug 8 12:25:51 2003 UTC revision 1.7 by lefcha, Mon Feb 9 22:03:12 2004 UTC
# Line 66  set_account(char *line, regmatch_t * m) Line 66  set_account(char *line, regmatch_t * m)
66          strncat(node->key, line + m[1].rm_so,          strncat(node->key, line + m[1].rm_so,
67              min(m[1].rm_eo - m[1].rm_so, KEY_LEN - 1));              min(m[1].rm_eo - m[1].rm_so, KEY_LEN - 1));
68    
69  #ifdef DEBUG          debug("ACCOUNT: '%s'\n", node->key);
         fprintf(stderr, "debug: ACCOUNT: '%s'\n", node->key);  
 #endif  
70    
71          if (m[3].rm_so != -1) {          if (m[3].rm_so != -1) {
72                  strncat(node->username, line + m[3].rm_so,                  strncat(node->username, line + m[3].rm_so,
# Line 81  set_account(char *line, regmatch_t * m) Line 79  set_account(char *line, regmatch_t * m)
79                  if (string_decode(node->username))                  if (string_decode(node->username))
80                          return ERROR_CONFIG_PARSE;                          return ERROR_CONFIG_PARSE;
81    
82  #ifdef DEBUG          debug("USERNAME: '%s'\n", node->username);
         fprintf(stderr, "debug: USERNAME: '%s'\n", node->username);  
 #endif  
83    
84          if (m[4].rm_so != -1) {          if (m[4].rm_so != -1) {
85                  strncat(node->password, line + m[4].rm_so,                  strncat(node->password, line + m[4].rm_so,
# Line 92  set_account(char *line, regmatch_t * m) Line 88  set_account(char *line, regmatch_t * m)
88                          if (string_decode(node->password))                          if (string_decode(node->password))
89                                  return ERROR_CONFIG_PARSE;                                  return ERROR_CONFIG_PARSE;
90                  node->passwdattr = PASSWORD_PLAIN;                  node->passwdattr = PASSWORD_PLAIN;
91                    debug("PASSWORD: ''\n");
92          } else          } else
93                  flags |= FLAG_BLANK_PASSWORD;                  flags |= FLAG_BLANK_PASSWORD;
94    
 #ifdef DEBUG  
         fprintf(stderr, "debug: PASSWORD: '%s'\n", node->password);  
 #endif  
   
95          strncat(node->server, line + m[6].rm_so,          strncat(node->server, line + m[6].rm_so,
96              min(m[6].rm_eo - m[6].rm_so, SERVER_LEN - 1));              min(m[6].rm_eo - m[6].rm_so, SERVER_LEN - 1));
97    
98  #ifdef DEBUG          debug("SERVER: '%s'\n", node->server);
         fprintf(stderr, "debug: SERVER: '%s'\n", node->server);  
 #endif  
99    
100          if (m[7].rm_so != -1) {          if (m[7].rm_so != -1) {
101                  n = min(m[7].rm_eo - m[7].rm_so - 1, 5);                  n = min(m[7].rm_eo - m[7].rm_so - 1, 5);
102                  xstrncpy(p, line + m[7].rm_so + 1, n);                  xstrncpy(p, line + m[7].rm_so + 1, n);
103                  p[n] = '\0';                  p[n] = '\0';
104                  node->port = strtoul(p, NULL, 10);                  node->port = strtoul(p, NULL, 10);
105  #ifdef DEBUG                  debug("PORT: %d\n", node->port);
                 fprintf(stderr, "debug: PORT: %d\n", node->port);  
 #endif  
106          }          }
107          if (m[8].rm_so != -1) {          if (m[8].rm_so != -1) {
108                  if (m[7].rm_so == -1)                  if (m[7].rm_so == -1)
# Line 187  set_mboxgrp(char *line, regmatch_t * m) Line 176  set_mboxgrp(char *line, regmatch_t * m)
176          strncat(node->key, line + m[1].rm_so,          strncat(node->key, line + m[1].rm_so,
177              min(m[1].rm_eo - m[1].rm_so, KEY_LEN - 1));              min(m[1].rm_eo - m[1].rm_so, KEY_LEN - 1));
178    
179  #ifdef DEBUG          debug("FOLDER: '%s'\n", node->key);
         fprintf(stderr, "debug: FOLDER: '%s'\n", node->key);  
 #endif  
180    
181          strncat(mboxs, line + m[2].rm_so,          strncat(mboxs, line + m[2].rm_so,
182              min(m[2].rm_eo - m[2].rm_so, LINE_MAX - 1));              min(m[2].rm_eo - m[2].rm_so, LINE_MAX - 1));
# Line 262  set_mbox(char *name) Line 249  set_mbox(char *name)
249    
250          strncat(node->name, s, MBOX_NAME_LEN - 1);          strncat(node->name, s, MBOX_NAME_LEN - 1);
251    
252  #ifdef DEBUG          debug("MBOX: '%s'\n", node->name);
         fprintf(stderr, "debug: MBOX: '%s'\n", node->name);  
 #endif  
253    
254          APPEND_LINKED_LIST(cur_acct->mboxes, node, mbox);          APPEND_LINKED_LIST(cur_acct->mboxes, node, mbox);
255    
# Line 332  apply_namespace(char *mbox, char *prefix Line 317  apply_namespace(char *mbox, char *prefix
317          while ((c = strchr(c, '/')))          while ((c = strchr(c, '/')))
318                  *(c++) = delim;                  *(c++) = delim;
319    
320  #ifdef DEBUG          debug("MAILBOX: '%s'\n", m);
         fprintf(stderr, "debug: MAILBOX: '%s'\n", m);  
 #endif  
321    
322          return m;          return m;
323  }  }

Legend:
Removed from v.1.3.2.2  
changed lines
  Added in v.1.7

webmaster@linux.gr
ViewVC Help
Powered by ViewVC 1.1.26