extract fix

This commit is contained in:
SJ 2015-03-18 11:00:42 +01:00
parent 5bbd6f18de
commit fc08523afa
2 changed files with 1 additions and 26 deletions

View File

@ -14,7 +14,7 @@
#define VERSION "1.2.0"
#define BUILD 908
#define BUILD 909
#define HOSTID "mailarchiver"

View File

@ -208,31 +208,6 @@ int extract_tnef(struct session_data *sdata, struct _state *state, char *filenam
#endif
void read_content_with_popen(struct session_data *sdata, struct _state *state, char *cmd, struct __config *cfg){
int len;
char buf[MAXBUFSIZE];
FILE *f;
if(cfg->verbosity >= _LOG_DEBUG) syslog(LOG_INFO, "running command: '%s'", cmd);
f = popen(cmd, "r");
if(f){
while(fgets(buf, sizeof(buf)-1, f)){
len = strlen(buf);
if(state->bodylen < BIGBUFSIZE-len-1){
memcpy(&(state->b_body[state->bodylen]), buf, len);
state->bodylen += len;
}
else break;
}
fclose(f);
}
else syslog(LOG_PRIORITY, "%s: popen(): %s", sdata->ttmpfile, buf);
}
void kill_helper(){
syslog(LOG_PRIORITY, "error: helper is killed by alarm");