git://git.exim.org
/
exim.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
b3ce3e5
)
tidying
author
Jeremy Harris
<jgh146exb@wizmail.org>
Sun, 14 Mar 2021 12:54:11 +0000
(12:54 +0000)
committer
Jeremy Harris
<jgh146exb@wizmail.org>
Sun, 25 Apr 2021 20:45:13 +0000
(21:45 +0100)
src/src/dbstuff.h
patch
|
blob
|
history
src/src/deliver.c
patch
|
blob
|
history
src/src/expand.c
patch
|
blob
|
history
src/src/string.c
patch
|
blob
|
history
src/src/transports/smtp.c
patch
|
blob
|
history
diff --git
a/src/src/dbstuff.h
b/src/src/dbstuff.h
index 89934154a68e14736c188534cab2ff74c29e65f1..8a8a5fb67e19858e877b3959e22f1ea2ba406984 100644
(file)
--- a/
src/src/dbstuff.h
+++ b/
src/src/dbstuff.h
@@
-75,7
+75,7
@@
free() must not die when passed NULL */
key.dptr != NULL)
/* EXIM_DBDELETE_CURSOR - terminate scanning operation. */
key.dptr != NULL)
/* EXIM_DBDELETE_CURSOR - terminate scanning operation. */
-#define EXIM_DBDELETE_CURSOR(cursor) free(cursor)
+#define EXIM_DBDELETE_CURSOR(cursor)
store_
free(cursor)
/* EXIM_DBCLOSE */
#define EXIM_DBCLOSE__(db) tdb_close(db)
/* EXIM_DBCLOSE */
#define EXIM_DBCLOSE__(db) tdb_close(db)
diff --git
a/src/src/deliver.c
b/src/src/deliver.c
index 9ebd281fca33d32ba750050d28355d0688bef00f..f2187e22aaf72961881cb3da3d63e5d90468b0dd 100644
(file)
--- a/
src/src/deliver.c
+++ b/
src/src/deliver.c
@@
-2884,10
+2884,8
@@
while (addr_local)
deliveries (e.g. to pipes) can take a substantial time. */
if (!(dbm_file = dbfn_open(US"retry", O_RDONLY, &dbblock, FALSE, TRUE)))
deliveries (e.g. to pipes) can take a substantial time. */
if (!(dbm_file = dbfn_open(US"retry", O_RDONLY, &dbblock, FALSE, TRUE)))
- {
DEBUG(D_deliver|D_retry|D_hints_lookup)
debug_printf("no retry data available\n");
DEBUG(D_deliver|D_retry|D_hints_lookup)
debug_printf("no retry data available\n");
- }
addr2 = addr;
addr3 = NULL;
addr2 = addr;
addr3 = NULL;
diff --git
a/src/src/expand.c
b/src/src/expand.c
index bce3356298ba0174c3c7fd9ec50a044eddd464eb..989e97b84bed7cfc9fe34442f51de71434c9ad40 100644
(file)
--- a/
src/src/expand.c
+++ b/
src/src/expand.c
@@
-6431,13
+6431,10
@@
while (*s)
condition for real. For EITEM_MAP and EITEM_REDUCE, do the same, using
the normal internal expansion function. */
condition for real. For EITEM_MAP and EITEM_REDUCE, do the same, using
the normal internal expansion function. */
- if (item_type == EITEM_FILTER)
- {
- if ((temp = eval_condition(expr, &resetok, NULL)))
- s = temp;
- }
- else
+ if (item_type != EITEM_FILTER)
temp = expand_string_internal(s, TRUE, &s, TRUE, TRUE, &resetok);
temp = expand_string_internal(s, TRUE, &s, TRUE, TRUE, &resetok);
+ else
+ if ((temp = eval_condition(expr, &resetok, NULL))) s = temp;
if (!temp)
{
if (!temp)
{
@@
-6446,7
+6443,7
@@
while (*s)
goto EXPAND_FAILED;
}
goto EXPAND_FAILED;
}
- Uskip_whitespace(&s);
+ Uskip_whitespace(&s);
/*{*/
if (*s++ != '}')
{ /*{*/
expand_string_message = string_sprintf("missing } at end of condition "
if (*s++ != '}')
{ /*{*/
expand_string_message = string_sprintf("missing } at end of condition "
diff --git
a/src/src/string.c
b/src/src/string.c
index afdb517a25e146bd4d64e114c3eb2117cb324ed9..fbb19537cba40fcf6d0302f82a66a9a6c0619253 100644
(file)
--- a/
src/src/string.c
+++ b/
src/src/string.c
@@
-952,12
+952,15
@@
else
s = ss;
if (!*s || *++s != sep || sep_is_special) break;
}
s = ss;
if (!*s || *++s != sep || sep_is_special) break;
}
+
+ /* Trim trailing spaces from the returned string */
+
/* while (g->ptr > 0 && isspace(g->s[g->ptr-1])) g->ptr--; */
while ( g->ptr > 0 && isspace(g->s[g->ptr-1])
&& (g->ptr == 1 || g->s[g->ptr-2] != '\\') )
g->ptr--;
buffer = string_from_gstring(g);
/* while (g->ptr > 0 && isspace(g->s[g->ptr-1])) g->ptr--; */
while ( g->ptr > 0 && isspace(g->s[g->ptr-1])
&& (g->ptr == 1 || g->s[g->ptr-2] != '\\') )
g->ptr--;
buffer = string_from_gstring(g);
- gstring_release_unused
(g
);
+ gstring_release_unused
_trc(g, func, line
);
}
/* Update the current pointer and return the new string */
}
/* Update the current pointer and return the new string */
@@
-1143,7
+1146,7
@@
BOOL srctaint = is_tainted(s);
if (!g)
{
unsigned inc = count < 4096 ? 127 : 1023;
if (!g)
{
unsigned inc = count < 4096 ? 127 : 1023;
- unsigned size = ((count + inc) & ~inc) + 1;
+ unsigned size = ((count + inc) & ~inc) + 1;
/* round up requested count */
g = string_get_tainted(size, srctaint);
}
else if (srctaint && !is_tainted(g->s))
g = string_get_tainted(size, srctaint);
}
else if (srctaint && !is_tainted(g->s))
diff --git
a/src/src/transports/smtp.c
b/src/src/transports/smtp.c
index 52940572be33439cf093d54a16993715773fbafd..e7e03213e1685f0a4cc4590bc5d7311d94182075 100644
(file)
--- a/
src/src/transports/smtp.c
+++ b/
src/src/transports/smtp.c
@@
-3607,13
+3607,12
@@
for (int fd_bits = 3; fd_bits; )
timeout = 5;
}
else
timeout = 5;
}
else
- {
for (int nbytes = 0; rc - nbytes > 0; nbytes += i)
if ((i = write(pfd[0], buf + nbytes, rc - nbytes)) < 0) goto done;
for (int nbytes = 0; rc - nbytes > 0; nbytes += i)
if ((i = write(pfd[0], buf + nbytes, rc - nbytes)) < 0) goto done;
- }
/* Handle outbound data. We cannot combine payload and the TLS-close
/* Handle outbound data. We cannot combine payload and the TLS-close
- due to the limitations of the (pipe) channel feeding us. */
+ due to the limitations of the (pipe) channel feeding us. Maybe use a unix-domain
+ socket? */
if (FD_ISSET(pfd[0], &rfds))
if ((rc = read(pfd[0], buf, bsize)) <= 0)
{
if (FD_ISSET(pfd[0], &rfds))
if ((rc = read(pfd[0], buf, bsize)) <= 0)
{
@@
-3628,11
+3627,9
@@
for (int fd_bits = 3; fd_bits; )
shutdown(tls_out.active.sock, SHUT_WR);
}
else
shutdown(tls_out.active.sock, SHUT_WR);
}
else
- {
for (int nbytes = 0; rc - nbytes > 0; nbytes += i)
if ((i = tls_write(ct_ctx, buf + nbytes, rc - nbytes, FALSE)) < 0)
goto done;
for (int nbytes = 0; rc - nbytes > 0; nbytes += i)
if ((i = tls_write(ct_ctx, buf + nbytes, rc - nbytes, FALSE)) < 0)
goto done;
- }
if (fd_bits & 1) FD_SET(tls_out.active.sock, &rfds);
if (fd_bits & 2) FD_SET(pfd[0], &rfds);
if (fd_bits & 1) FD_SET(tls_out.active.sock, &rfds);
if (fd_bits & 2) FD_SET(pfd[0], &rfds);