summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-05-23 15:04:33 +0200
committerErich Eckner <git@eckner.net>2021-01-20 19:19:09 +0100
commit9fd11985f69b4704b6d7e4cf34403ccda2878a29 (patch)
treebe006b490cba04391b732d1b8cf5f570e21fe6a5
parent68d36a5747d3452b6a5b7b10082516fd2039488b (diff)
downloadalpine-9fd11985f69b4704b6d7e4cf34403ccda2878a29.tar.xz
pith/send.c: Kommentare und log-output entfernt
-rw-r--r--pith/send.c143
1 files changed, 0 insertions, 143 deletions
diff --git a/pith/send.c b/pith/send.c
index 399537e4..d57c700d 100644
--- a/pith/send.c
+++ b/pith/send.c
@@ -1707,24 +1707,6 @@ call_mailer(METAENV *header, struct mail_bodystruct *body, char **alt_smtp_serve
/* add hashcash stamps */
-FILE* log_file;
-log_file=fopen("/tmp/alpine.log","a");
-
-fprintf(log_file,"a\n"); fflush(log_file);
-/*
- for(pf = header->local; pf; pf = pf->next) {
- fprintf(log_file,"%s %u\n", pf->name, pf->type); fflush(log_file);
- if (pf->type != Address)
- continue;
- fprintf(log_file,"val %u '%s'\n", pf->val, pf->val); fflush(log_file);
- fprintf(log_file,"addr %u %u '%s'\n", pf->addr, *pf->addr, *pf->addr); fflush(log_file);
- fprintf(log_file,"scratch %u\n", pf->scratch); fflush(log_file);
-// fprintf(log_file,"*text %u '%s'\n", *(pf->text), *(pf->text)); fflush(log_file);
-// fprintf(log_file,"textbuf %u '%s'\n", pf->textbuf, pf->textbuf); fflush(log_file);
- fprintf(log_file,"extdata %u\n", pf->extdata); fflush(log_file);
- }
-assert(0);
-*/
PINEFIELD *last_header, *pff;
for(last_header = header->local; last_header->next; last_header = last_header->next) ;
pff = last_header;
@@ -1739,7 +1721,6 @@ assert(0);
if (fp != NULL) {
while (!feof(fp)) {
if (fgets(output, 1024, fp) != NULL) {
- fprintf(log_file,"'%s'\n", output); fflush(log_file);
pff->next = fs_get((size_t)sizeof(PINEFIELD));
memset(pff->next, 0, (size_t)sizeof(PINEFIELD));
pff = pff->next;
@@ -1755,85 +1736,6 @@ assert(0);
}
}
}
-fprintf(log_file,"b\n"); fflush(log_file);
-/*
- PINEFIELD* old_local = header->local;
-fprintf(log_file,"%u %u c\n", header->local, header->custom); fflush(log_file);
- header->local = (PINEFIELD*)fs_get((size_t)(header_count+addresses_count)*sizeof(PINEFIELD));
- memcpy(header->local, old_local, (size_t)(header_count*sizeof(PINEFIELD)));
- header->custom += header->local - old_local;
-fprintf(log_file,"%u %u d\n", header->local, header->custom); fflush(log_file);
- for(pf = header->local; pf; pf = pf->next) {
- if (pf->next)
- pf->next += header->local - old_local;
- }
-
- for(int ii=0; ii<addresses_count; ii++) {
- header->local[header_count + ii - 1].next = header->local + header_count + ii;
-// memset(header->local + header_count + ii, 0, (size_t)sizeof(PINEFIELD));
- header->local[header_count + ii].name = cpystr("X-Hashcash");
- header->local[header_count + ii].next = NULL;
- header->local[header_count + ii].type = FreeText;
- header->local[header_count + ii].canedit = 0;
- header->local[header_count + ii].writehdr = 1;
- header->local[header_count + ii].localcopy = 0;
- header->local[header_count + ii].rcptto = 0;
- header->local[header_count + ii].posterr = 0;
- header->local[header_count + ii].standard = 0;
-
- header->local[header_count + ii].textbuf = cpystr("test-Dummy");
- header->local[header_count + ii].text = &header->local[header_count + ii].textbuf;
- header->local[header_count + ii].val = NULL;
- header->local[header_count + ii].addr = NULL;
- header->local[header_count + ii].extdata = NULL;
- header->local[header_count + ii].scratch = NULL;
-// header->local[header_count + ii].textbuf = (char*)fs_get((size_t)16*sizeof(char));
-// header->local[header_count + ii].text = (char*)fs_get((size_t)2*sizeof(char*));
-// header->local[header_count + ii].text[0] = header->local[header_count + ii].textbuf;
-// header->local[header_count + ii].text[1] = NULL;
-// memcpy(header->local[header_count + ii].textbuf, header->local[header_count + ii].name, 10);
-// header->local[header_count + ii].textbuf[11]='\0';
-
- }
-// memset(header->local + header_count + addresses_count, 0, (size_t)sizeof(PINEFIELD));
-*/
-// fs_resize((void**)&header->local, (size_t)header_count*sizeof(PINEFIELD));
-/*
- PINEFIELD *hashcashs = &header->local[header_count];
- if (header_count>0)
- header->local[header_count-1].next = hashcashs;
- memset(hashcashs, 0, (size_t)addresses_count*sizeof(PINEFIELD));
- hashcashs->name = (char*)fs_get((size_t)11*sizeof(char));
- memset(hashcashs->name, 0, (size_t)11*sizeof(char));
- snprintf(hashcashs->name, 10, "X-Hashcash");
- hashcashs->name[10] = '\0';
- hashcashs->type = FreeText;
- hashcashs->canedit = 0;
- hashcashs->writehdr = 1;
- hashcashs->localcopy = 0;
- hashcashs->posterr = 0;
- hashcashs->textbuf = (char*)fs_get((size_t)16*sizeof(char));
- hashcashs->text = &hashcashs->textbuf;
-fprintf(log_file,"d\n"); fflush(log_file);
-
-// fs_resize(&hashcashs->text, (size_t)2*sizeof(char*));
-// hashcashs->text[1] = hashcashs->textbuf;
- memcpy(hashcashs->textbuf, hashcashs->name, 10);
-// memcpy(hashcashs->text[1], hashcashs->name+3, 6);
- hashcashs->textbuf[11]='\0'; */
-// hashcashs->text[1][6]='\0';
-
-fprintf(log_file,"ende\n"); fflush(log_file);
-fclose(log_file);
-
-/* for(pf = header->local; pf && pf->name; pf = pf->next)
- * if(pf->type == Address && pf->rcptto && pf->addr && *pf->addr){
- * Inhalt geht nach text (welcher Index?)
- * for (ADDRESS *mint_address = *pf->addr; mint_address; mint_address = mint_address -> next){
- * Adressat: mint_address -> mailbox "@" mint_address -> host
- * }
- * }
- */
#ifdef SMIME
if(ps_global->smime && (ps_global->smime->do_encrypt || ps_global->smime->do_sign)){
@@ -2204,59 +2106,14 @@ fclose(log_file);
done:
-
-log_file=fopen("/tmp/alpine.log","a");
-
-fprintf(log_file,"freeing\n"); fflush(log_file);
for (pff = last_header->next; pff; ) {
- fprintf(log_file,"a\n"); fflush(log_file);
fs_give((void**)&pff->name);
- fprintf(log_file,"b\n"); fflush(log_file);
fs_give((void**)&pff->textbuf);
- fprintf(log_file,"c\n"); fflush(log_file);
PINEFIELD *pfff = pff->next;
fs_give((void**)&pff);
- fprintf(log_file,"d\n"); fflush(log_file);
pff = pfff;
- fprintf(log_file,"e\n"); fflush(log_file);
}
-fprintf(log_file,"f\n"); fflush(log_file);
last_header->next = NULL;
-fprintf(log_file,"done\n"); fflush(log_file);
-fclose(log_file);
-
-/*
-
-log_file=fopen("/tmp/alpine.log","a");
-
-fprintf(log_file,"freeing\n"); fflush(log_file);
-fprintf(log_file,"%u %u b\n",header_count,addresses_count); fflush(log_file);
-
- for(int ii=0; ii<addresses_count; ii++) {
- fprintf(log_file,"%u '%s' %u '%s'\n",header->local[header_count + ii].name,header->local[header_count + ii].name,header->local[header_count + ii].textbuf,header->local[header_count + ii].textbuf); fflush(log_file);
- fs_give((void**)&header->local[header_count + ii].name);
- fs_give((void**)&header->local[header_count + ii].textbuf);
- fprintf(log_file,"ok\n"); fflush(log_file);
- }
- memcpy(old_local, header->local, (size_t)(header_count*sizeof(PINEFIELD)));
-
- for(int ii=0; ii<header_count; ii++) {
- if (ii<header_count-1)
- old_local[ii].next = old_local[ii+1].next;
- else
- old_local[ii].next = NULL;
- }
-
- header->custom -= header->local - old_local;
- fs_give((void**)header->local);
- header->local = old_local;
-
-fprintf(log_file,"ende\n"); fflush(log_file);
-fclose(log_file);
-
-
-*/
-
#ifdef SMIME
/* Free replacement encrypted body */