mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-25 19:10:11 +01:00
extract fix
This commit is contained in:
parent
5bbd6f18de
commit
fc08523afa
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
#define VERSION "1.2.0"
|
#define VERSION "1.2.0"
|
||||||
|
|
||||||
#define BUILD 908
|
#define BUILD 909
|
||||||
|
|
||||||
#define HOSTID "mailarchiver"
|
#define HOSTID "mailarchiver"
|
||||||
|
|
||||||
|
@ -208,31 +208,6 @@ int extract_tnef(struct session_data *sdata, struct _state *state, char *filenam
|
|||||||
|
|
||||||
#endif
|
#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(){
|
void kill_helper(){
|
||||||
syslog(LOG_PRIORITY, "error: helper is killed by alarm");
|
syslog(LOG_PRIORITY, "error: helper is killed by alarm");
|
||||||
|
Loading…
Reference in New Issue
Block a user