masqmail

diff src/spool.c @ 414:309935f59820

Minor refactoring and added a newline to the debug output.
author markus schnalke <meillo@marmaro.de>
date Wed, 29 Feb 2012 14:23:16 +0100
parents b27f66555ba8
children 0430194f7ef8
line diff
     1.1 --- a/src/spool.c	Wed Feb 29 14:22:44 2012 +0100
     1.2 +++ b/src/spool.c	Wed Feb 29 14:23:16 2012 +0100
     1.3 @@ -73,17 +73,18 @@
     1.4  {
     1.5  	address *rcpt = NULL;
     1.6  
     1.7 -	if (line[3] != '\0') {
     1.8 -		if (line[4] != '|') {
     1.9 -			rcpt = create_address(&(line[4]), TRUE);
    1.10 -		} else {
    1.11 -			rcpt = create_address_pipe(&(line[4]));
    1.12 -		}
    1.13 -		if (line[3] == 'X') {
    1.14 -			addr_mark_delivered(rcpt);
    1.15 -		} else if (line[3] == 'F') {
    1.16 -			addr_mark_failed(rcpt);
    1.17 -		}
    1.18 +	if (!line[3]) {
    1.19 +		return NULL;
    1.20 +	}
    1.21 +	if (line[4] == '|') {
    1.22 +		rcpt = create_address_pipe(line+4);
    1.23 +	} else {
    1.24 +		rcpt = create_address(line+4, TRUE);
    1.25 +	}
    1.26 +	if (line[3] == 'X') {
    1.27 +		addr_mark_delivered(rcpt);
    1.28 +	} else if (line[3] == 'F') {
    1.29 +		addr_mark_failed(rcpt);
    1.30  	}
    1.31  	return rcpt;
    1.32  }
    1.33 @@ -147,7 +148,8 @@
    1.34  			break;
    1.35  		} else if (strncasecmp(buf, "MF:", 3) == 0) {
    1.36  			msg->return_path = create_address(&(buf[3]), TRUE);
    1.37 -			DEBUG(3) debugf("spool_read: MAIL FROM: %s", msg->return_path->address);
    1.38 +			DEBUG(3) debugf("spool_read: MAIL FROM: %s\n",
    1.39 +					msg->return_path->address);
    1.40  		} else if (strncasecmp(buf, "RT:", 3) == 0) {
    1.41  			address *addr;
    1.42  			addr = spool_scan_rcpt(buf);