comparison src/accept.c @ 303:3e3c280ca5b2

replaced header_fold() with a better implementation
author markus schnalke <meillo@marmaro.de>
date Thu, 09 Dec 2010 18:01:46 -0300
parents ca2d11aec2a3
children d5ce2ba71e7b
comparison
equal deleted inserted replaced
302:2ffcd38ccf53 303:3e3c280ca5b2
360 360
361 DEBUG(3) debugf("adding 'Received:' header\n"); 361 DEBUG(3) debugf("adding 'Received:' header\n");
362 362
363 if (g_list_length(msg->rcpt_list) == 1) { 363 if (g_list_length(msg->rcpt_list) == 1) {
364 address *addr = (address *) (g_list_first(msg->rcpt_list)->data); 364 address *addr = (address *) (g_list_first(msg->rcpt_list)->data);
365 for_string = g_strdup_printf("\n\tfor %s", addr_string(addr)); 365 for_string = g_strdup_printf(" for %s", addr_string(addr));
366 } 366 }
367 367
368 if (!msg->received_host) { 368 if (!msg->received_host) {
369 /* received locally */ 369 /* received locally */
370 hdr = create_header(HEAD_RECEIVED, 370 hdr = create_header(HEAD_RECEIVED,
388 msg->received_host, conf.host_name, 388 msg->received_host, conf.host_name,
389 prot_names[msg->received_prot], PACKAGE, VERSION, 389 prot_names[msg->received_prot], PACKAGE, VERSION,
390 msg->uid, for_string ? for_string : "", rec_timestamp()); 390 msg->uid, for_string ? for_string : "", rec_timestamp());
391 #endif 391 #endif
392 } 392 }
393 header_fold(hdr); 393 header_fold(hdr, 78);
394 msg->hdr_list = g_list_prepend(msg->hdr_list, hdr); 394 msg->hdr_list = g_list_prepend(msg->hdr_list, hdr);
395 395
396 if (for_string) 396 if (for_string)
397 g_free(for_string); 397 g_free(for_string);
398 398