added a filename attribute to the sdata struct

This commit is contained in:
SJ
2012-01-03 00:19:43 +01:00
parent 1b57459f89
commit 0353b27f68
17 changed files with 317 additions and 125 deletions

View File

@@ -389,6 +389,8 @@ int main(int argc, char **argv){
memset(sdata.ttmpfile, 0, sizeof(sdata.ttmpfile));
while((rc = read(0, sdata.ttmpfile, RND_STR_LEN+1)) > 0){
snprintf(sdata.filename, SMALLBUFSIZE-1, "%s", sdata.ttmpfile);
trimBuffer(sdata.ttmpfile);
id = get_id_by_piler_id(&sdata, &digest[0], &bodydigest[0], &cfg);
@@ -420,6 +422,7 @@ int main(int argc, char **argv){
}
else {
snprintf(sdata.ttmpfile, SMALLBUFSIZE-1, "%s", argv[1]);
snprintf(sdata.filename, SMALLBUFSIZE-1, "%s", sdata.ttmpfile);
rc = retrieve_email_from_archive(&sdata, stdout, &cfg);
}