X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fsrc%2Fdcc.c;h=b03690ca67f4f34d73e68a9efe48a0b2395bb892;hb=b81207d2bfa92b2a666b01ce64c1b5e06a4a2098;hp=d630c58a976f836a79c96feb70a72964aa344d4c;hpb=3386088d5af4d4c61faa12ae29560e2c5bd43304;p=user%2Fhenk%2Fcode%2Fexim.git diff --git a/src/src/dcc.c b/src/src/dcc.c index d630c58a9..b03690ca6 100644 --- a/src/src/dcc.c +++ b/src/src/dcc.c @@ -144,18 +144,18 @@ dcc_process(uschar **listptr) bzero(opts,sizeof(opts)); Ustrncpy(opts, dccifd_options, sizeof(opts)-1); /* if $acl_m_dcc_override_client_ip is set use it */ - if (((override_client_ip = expand_string(US"$acl_m_dcc_override_client_ip")) != NULL) && + if (((override_client_ip = expand_string(US"$acl_m_dcc_override_client_ip")) != NULL) && (override_client_ip[0] != '\0')) { Ustrncpy(client_ip, override_client_ip, sizeof(client_ip)-1); DEBUG(D_acl) debug_printf("DCC: Client IP (overridden): %s\n", client_ip); - } + } else if(sender_host_address) { /* else if $sender_host_address is available use that? */ Ustrncpy(client_ip, sender_host_address, sizeof(client_ip)-1); DEBUG(D_acl) debug_printf("DCC: Client IP (sender_host_address): %s\n", client_ip); - } + } else { /* sender_host_address is NULL which means it comes from localhost */ Ustrncpy(client_ip, dcc_default_ip_option, sizeof(client_ip)-1); @@ -451,7 +451,7 @@ dcc_process(uschar **listptr) /* The third and following lines are the X-DCC header, * so we store it in dcc_header_str. */ /* check if we don't get more than we can handle */ - if(k < sizeof(dcc_header_str)) { + if(k < sizeof(dcc_header_str)) { dcc_header_str[k] = recvbuf[i]; k++; }