projects
/
exim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge from master into 4.next
[exim.git]
/
src
/
src
/
transports
/
appendfile.c
diff --git
a/src/src/transports/appendfile.c
b/src/src/transports/appendfile.c
index c8abe9bc50fefa8edefd47c141bf1674eec02549..884452208554310abd4511a4940f6cc7cf07dcf1 100644
(file)
--- a/
src/src/transports/appendfile.c
+++ b/
src/src/transports/appendfile.c
@@
-2,7
+2,7
@@
* Exim - an Internet mail transport agent *
*************************************************/
* Exim - an Internet mail transport agent *
*************************************************/
-/* Copyright (c) University of Cambridge 1995 - 201
5
*/
+/* Copyright (c) University of Cambridge 1995 - 201
6
*/
/* See the file NOTICE for conditions of use and distribution. */
/* See the file NOTICE for conditions of use and distribution. */
@@
-619,19
+619,18
@@
if (host_find_byname(&host, NULL, 0, NULL, FALSE) == HOST_FIND_FAILED)
host.address = US"127.0.0.1";
host.address = US"127.0.0.1";
-for (h = &host; h
!= NULL
; h = h->next)
+for (h = &host; h; h = h->next)
{
int sock, rc;
{
int sock, rc;
- int host_af =
(Ustrchr(h->address, ':') != NULL)
? AF_INET6 : AF_INET;
+ int host_af =
Ustrchr(h->address, ':') != NULL
? AF_INET6 : AF_INET;
DEBUG(D_transport) debug_printf("calling comsat on %s\n", h->address);
DEBUG(D_transport) debug_printf("calling comsat on %s\n", h->address);
- sock = ip_socket(SOCK_DGRAM, host_af);
- if (sock < 0) continue;
+ if ((sock = ip_socket(SOCK_DGRAM, host_af)) < 0) continue;
/* Connect never fails for a UDP socket, so don't set a timeout. */
/* Connect never fails for a UDP socket, so don't set a timeout. */
- (void)ip_connect(sock, host_af, h->address, ntohs(sp->s_port), 0);
+ (void)ip_connect(sock, host_af, h->address, ntohs(sp->s_port), 0
, FALSE
);
rc = send(sock, buffer, Ustrlen(buffer) + 1, 0);
(void)close(sock);
rc = send(sock, buffer, Ustrlen(buffer) + 1, 0);
(void)close(sock);
@@
-679,15
+678,16
@@
if (len == 0) return tblock;
/* Search the formats for a match */
/* Search the formats for a match */
-while ((s = string_nextinlist(&format,&sep,big_buffer,big_buffer_size))
!= NULL
)
+while ((s = string_nextinlist(&format,&sep,big_buffer,big_buffer_size)))
{
int slen = Ustrlen(s);
BOOL match = len >= slen && Ustrncmp(data, s, slen) == 0;
uschar *tp = string_nextinlist(&format, &sep, big_buffer, big_buffer_size);
{
int slen = Ustrlen(s);
BOOL match = len >= slen && Ustrncmp(data, s, slen) == 0;
uschar *tp = string_nextinlist(&format, &sep, big_buffer, big_buffer_size);
- if (match)
+
+ if (match && tp)
{
transport_instance *tt;
{
transport_instance *tt;
- for (tt = transports; tt
!= NULL
; tt = tt->next)
+ for (tt = transports; tt; tt = tt->next)
if (Ustrcmp(tp, tt->name) == 0)
{
DEBUG(D_transport)
if (Ustrcmp(tp, tt->name) == 0)
{
DEBUG(D_transport)
@@
-2873,9
+2873,14
@@
at initialization time. */
if (yield == OK)
{
if (yield == OK)
{
- if (!transport_write_message(addr, fd, ob->options, 0, tblock->add_headers,
- tblock->remove_headers, ob->check_string, ob->escape_string,
- tblock->rewrite_rules, tblock->rewrite_existflags))
+ transport_ctx tctx = {
+ tblock,
+ addr,
+ ob->check_string,
+ ob->escape_string,
+ ob->options
+ };
+ if (!transport_write_message(fd, &tctx, 0))
yield = DEFER;
}
yield = DEFER;
}