cosmetic fix

This commit is contained in:
SJ 2012-05-17 20:39:33 +02:00
parent e020f3c2cc
commit f7d0e270ee
2 changed files with 7 additions and 7 deletions

View File

@ -203,7 +203,7 @@ CLEANUP:
int retrieve_email_from_archive(struct session_data *sdata, FILE *dest, struct __config *cfg){ int retrieve_email_from_archive(struct session_data *sdata, FILE *dest, struct __config *cfg){
int i, rc, attachments; int i, rc, n, attachments;
char *buffer=NULL, *saved_buffer, *p, filename[SMALLBUFSIZE], pointer[SMALLBUFSIZE]; char *buffer=NULL, *saved_buffer, *p, filename[SMALLBUFSIZE], pointer[SMALLBUFSIZE];
struct ptr_array ptr_arr[MAX_ATTACHMENTS]; struct ptr_array ptr_arr[MAX_ATTACHMENTS];
@ -236,7 +236,7 @@ int retrieve_email_from_archive(struct session_data *sdata, FILE *dest, struct _
p = strstr(buffer, pointer); p = strstr(buffer, pointer);
if(p){ if(p){
*p = '\0'; *p = '\0';
fwrite(buffer, 1, p - buffer, dest); n = fwrite(buffer, 1, p - buffer, dest);
buffer = p + strlen(pointer); buffer = p + strlen(pointer);
if(strlen(ptr_arr[i].piler_id) == RND_STR_LEN){ if(strlen(ptr_arr[i].piler_id) == RND_STR_LEN){
@ -249,7 +249,7 @@ int retrieve_email_from_archive(struct session_data *sdata, FILE *dest, struct _
} }
if(buffer){ if(buffer){
fwrite(buffer, 1, strlen(buffer), dest); n = fwrite(buffer, 1, strlen(buffer), dest);
} }
buffer = saved_buffer; buffer = saved_buffer;

View File

@ -96,7 +96,7 @@ void post_parse(struct session_data *sdata, struct _state *state, struct __confi
int parse_line(char *buf, struct _state *state, struct session_data *sdata, struct __config *cfg){ int parse_line(char *buf, struct _state *state, struct session_data *sdata, struct __config *cfg){
char *p, *q, puf[SMALLBUFSIZE]; char *p, *q, puf[SMALLBUFSIZE];
int x, len, b64_len, boundary_line=0; int x, n, len, b64_len, boundary_line=0;
state->line_num++; state->line_num++;
len = strlen(buf); len = strlen(buf);
@ -121,13 +121,13 @@ int parse_line(char *buf, struct _state *state, struct session_data *sdata, stru
if(state->message_state == MSG_BODY && state->fd != -1 && is_item_on_string(state->boundaries, buf) == 0){ if(state->message_state == MSG_BODY && state->fd != -1 && is_item_on_string(state->boundaries, buf) == 0){
//printf("dumping: %s", buf); //printf("dumping: %s", buf);
write(state->fd, buf, len); n = write(state->fd, buf, len);
state->attachments[state->n_attachments].size += len; state->attachments[state->n_attachments].size += len;
} }
else { else {
state->saved_size += len; state->saved_size += len;
//printf("%s", buf); //printf("%s", buf);
write(state->mfd, buf, len); n = write(state->mfd, buf, len);
} }
@ -163,7 +163,7 @@ int parse_line(char *buf, struct _state *state, struct session_data *sdata, stru
} }
else { else {
snprintf(puf, sizeof(puf)-1, "ATTACHMENT_POINTER_%s.a%d_XXX_PILER", sdata->ttmpfile, state->n_attachments); snprintf(puf, sizeof(puf)-1, "ATTACHMENT_POINTER_%s.a%d_XXX_PILER", sdata->ttmpfile, state->n_attachments);
write(state->mfd, puf, strlen(puf)); n = write(state->mfd, puf, strlen(puf));
//printf("%s", puf); //printf("%s", puf);
} }
} }