X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fsrc%2Ftransport.c;h=e4aaa7debd889e8e2789883ddafa5c80337485cf;hb=c85879f8174a658ddac9524d078b2a717f964710;hp=ed3dcf0af7ccd622332fb1a0454ee5ee62e59e70;hpb=13a4b4c1810a1a9f3c956f1e92807a0d86c6f5bf;p=user%2Fhenk%2Fcode%2Fexim.git diff --git a/src/src/transport.c b/src/src/transport.c index ed3dcf0af..e4aaa7deb 100644 --- a/src/src/transport.c +++ b/src/src/transport.c @@ -265,6 +265,7 @@ for (int i = 0; i < 100; i++) } else /* Timeout wanted. */ { + sigalrm_seen = FALSE; ALARM(local_timeout); rc = tpt_write(fd, block, len, more, tctx->options); save_errno = errno; @@ -591,14 +592,14 @@ if (include_affixes) return addr->address; } -if (addr->suffix == NULL) +if (!addr->suffix) { - if (addr->prefix == NULL) return addr->address; + if (!addr->prefix) return addr->address; return addr->address + Ustrlen(addr->prefix); } at = Ustrrchr(addr->address, '@'); -plen = (addr->prefix == NULL)? 0 : Ustrlen(addr->prefix); +plen = addr->prefix ? Ustrlen(addr->prefix) : 0; slen = Ustrlen(addr->suffix); return string_sprintf("%.*s@%s", (int)(at - addr->address - plen - slen), @@ -738,10 +739,17 @@ for (header_line * h = header_list; h; h = h->next) if (h->type != htype_old) return FALSE; } len = s ? Ustrlen(s) : 0; - if (strncmpic(h->text, s, len) != 0) continue; - ss = h->text + len; - while (*ss == ' ' || *ss == '\t') ss++; - if (*ss == ':') break; + if (len && s[len-1] == '*') /* trailing glob */ + { + if (strncmpic(h->text, s, len-1) == 0) break; + } + else + { + if (strncmpic(h->text, s, len) != 0) continue; + ss = h->text + len; + while (*ss == ' ' || *ss == '\t') ss++; + if (*ss == ':') break; + } } if (s) { include_header = FALSE; break; } } @@ -1265,7 +1273,7 @@ if ((write_pid = fork()) == 0) != sizeof(struct timeval) ) rc = FALSE; /* compiler quietening */ - exim_underbar_exit(0); + exim_underbar_exit(0, US"tpt-filter"); } save_errno = errno; @@ -1553,12 +1561,17 @@ for (host_item * host = hostlist; host; host = host->next) /* If this record is full, write it out with a new name constructed from the sequence number, increase the sequence number, and empty - the record. */ + the record. If we're doing a two-phase queue run initial phase, ping the + daemon to consider running a delivery on this host. */ if (host_record->count >= WAIT_NAME_MAX) { sprintf(CS buffer, "%.200s:%d", host->name, host_record->sequence); dbfn_write(dbm_file, buffer, host_record, sizeof(dbdata_wait) + host_length); +#ifdef EXPERIMENTAL_QUEUE_RAMP + if (f.queue_2stage && queue_fast_ramp && !queue_run_in_order) + queue_notify_daemon(message_id); +#endif host_record->sequence++; host_record->count = 0; host_length = 0;