mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-11-07 22:51:59 +01:00
Fixed message/rfc822 parsing
Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
parent
b2a1666c41
commit
a9f5562f63
@ -134,7 +134,7 @@ void post_parse(struct session_data *sdata, struct parser_state *state, struct c
|
||||
|
||||
digest_file(state->attachments[i].internalname, &(state->attachments[i].digest[0]));
|
||||
|
||||
if(cfg->verbosity >= _LOG_DEBUG) syslog(LOG_PRIORITY, "%s: attachment list: i:%d, name=*%s*, type: *%s*, size: %d, int.name: %s, digest: %s", sdata->ttmpfile, i, state->attachments[i].filename, state->attachments[i].type, state->attachments[i].size, state->attachments[i].internalname, state->attachments[i].digest);
|
||||
if(cfg->verbosity >= _LOG_DEBUG) syslog(LOG_PRIORITY, "%s: attachment list: i:%d, name=*%s*, type: *%s*, size: %d, int.name: %s, digest: %s, dumped: %d", sdata->ttmpfile, i, state->attachments[i].filename, state->attachments[i].type, state->attachments[i].size, state->attachments[i].internalname, state->attachments[i].digest, state->attachments[i].dumped);
|
||||
|
||||
char *p = determine_attachment_type(state->attachments[i].filename, state->attachments[i].type);
|
||||
len = strlen(p);
|
||||
@ -571,6 +571,8 @@ int parse_line(char *buf, struct parser_state *state, struct session_data *sdata
|
||||
state->message_rfc822 = 1;
|
||||
state->is_header = 1;
|
||||
|
||||
state->has_to_dump = 0;
|
||||
|
||||
if(sdata->ms_journal == 1){
|
||||
state->is_1st_header = 1;
|
||||
|
||||
|
@ -183,7 +183,7 @@ int main(int argc, char **argv){
|
||||
clearhash(data.mydomains);
|
||||
|
||||
for(i=1; i<=state.n_attachments; i++){
|
||||
printf("i:%d, name=*%s*, type: *%s*, size: %d, int.name: %s, digest: %s\n", i, state.attachments[i].filename, state.attachments[i].type, state.attachments[i].size, state.attachments[i].internalname, state.attachments[i].digest);
|
||||
printf("i:%d, name=*%s*, type: *%s*, size: %d, int.name: %s, dumped: %d, digest: %s\n", i, state.attachments[i].filename, state.attachments[i].type, state.attachments[i].size, state.attachments[i].internalname, state.attachments[i].dumped, state.attachments[i].digest);
|
||||
unlink(state.attachments[i].internalname);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user