int dup_accept_socket = -1;
int max_for_this_host = 0;
int save_log_selector = *log_selector;
-gstring * whofrom = NULL;
-uschar * whofrom_s;
+gstring * whofrom;
void *reset_point = store_get(0);
the local interface data. This is for logging; at the end of this function the
memory is reclaimed. */
-whofrom = string_append(whofrom, 3, "[", sender_host_address, "]");
+whofrom = string_append(NULL, 3, "[", sender_host_address, "]");
if (LOGGING(incoming_port))
whofrom = string_append(whofrom, 2, ":", string_sprintf("%d", sender_host_port));
pdkim_set_optional(sig,
CS dkim_sign_headers_expanded,
- dkim_identity_expanded,
+ CS dkim_identity_expanded,
pdkim_canon,
pdkim_canon, -1, 0, 0);
pcre_get_substring(CS tmpbuf, ovector, result, 1, &pre_malware_nb);
if (i==0) /* the first name we just copy to malware_name */
- g = string_cat(NULL, pre_malware_nb);
+ g = string_cat(NULL, US pre_malware_nb);
/*XXX could be string_append_listele? */
else /* concatenate each new virus name to previous */
uschar *p, *vname, *result_tag;
int bread=0;
- uschar * file_name;
uschar av_buffer[1024];
uschar *hostname = US"";
host_item connhost;
pdkim_strtrim(gstring * str)
{
uschar * p = str->s;
-uschar * q = p + str->ptr;
+uschar * q;
while (*p == '\t' || *p == ' ') /* dump the leading whitespace */
{ str->size--; str->ptr--; str->s++; }
continue;
}
- seen_items = string_catn(seen_items, ":", 1);
+ seen_items = string_catn(seen_items, US":", 1);
}
seen_items = string_cat(seen_items, item);
switch(rc)
{
default:
- log_write(0, LOG_MAIN, "invalid return %d from local_scan(). Temporary "
- "rejection given", rc);
- goto TEMPREJECT;
+ log_write(0, LOG_MAIN, "invalid return %d from local_scan(). Temporary "
+ "rejection given", rc);
+ goto TEMPREJECT;
case LOCAL_SCAN_REJECT_NOLOGHDR:
- BIT_CLEAR(log_selector, log_selector_size, Li_rejected_header);
- /* Fall through */
+ BIT_CLEAR(log_selector, log_selector_size, Li_rejected_header);
+ /* Fall through */
case LOCAL_SCAN_REJECT:
- smtp_code = US"550";
- if (errmsg == NULL) errmsg = US"Administrative prohibition";
- break;
+ smtp_code = US"550";
+ if (!errmsg) errmsg = US"Administrative prohibition";
+ break;
case LOCAL_SCAN_TEMPREJECT_NOLOGHDR:
- BIT_CLEAR(log_selector, log_selector_size, Li_rejected_header);
- /* Fall through */
+ BIT_CLEAR(log_selector, log_selector_size, Li_rejected_header);
+ /* Fall through */
case LOCAL_SCAN_TEMPREJECT:
TEMPREJECT:
- smtp_code = US"451";
- if (errmsg == NULL) errmsg = US"Temporary local problem";
- istemp = US"temporarily ";
- break;
+ smtp_code = US"451";
+ if (!errmsg) errmsg = US"Temporary local problem";
+ istemp = US"temporarily ";
+ break;
}
g = string_append(g, 2, US"F=",
0 identifier not matched
*/
-static int parse_string(struct Sieve *filter, struct String *data)
+static int
+parse_string(struct Sieve *filter, struct String *data)
{
gstring * g = NULL;
-int dataCapacity=0;
data->length = 0;
data->character = NULL;
if (dataLength+1 >= dataCapacity) /* increase buffer */
{
struct String *new;
- int newCapacity; /* Don't amalgamate with next line; some compilers grumble */
dataCapacity = dataCapacity ? dataCapacity * 2 : 4;
new = store_get(sizeof(struct String) * dataCapacity);
if (exec)
{
address_item *addr;
- int start;
uschar *buffer;
int buffer_capacity;
md5 base;
for
(
- mime_body=reason.character,reason_end=reason.character+reason.length;
- mime_body<(reason_end-(sizeof(nlnl)-1)) && memcmp(mime_body,nlnl,(sizeof(nlnl)-1));
+ mime_body = reason.character, reason_end = reason.character + reason.length;
+ mime_body < (reason_end-(sizeof(nlnl)-1)) && memcmp(mime_body, nlnl, (sizeof(nlnl)-1));
++mime_body
);
{
struct String qp = { .character = NULL, .length = 0 }; /* Keep compiler happy (PH) */
- start = reason.length;
addr->reply->headers = US"MIME-Version: 1.0\n"
"Content-Type: text/plain;\n"
"\tcharset=\"utf-8\"\n"
req_str = string_append(req_str, 3, "IP: ", sender_host_address, "\r\n");
if ((s = expand_string(US"$authenticated_id")) && *s)
req_str = string_append(req_str, 3, "User: ", s, "\r\n");
- req_str = string_catn(req_str, "\r\n", 2);
+ req_str = string_catn(req_str, US"\r\n", 2);
wrote = send(spamd_sock, req_str->s, req_str->ptr, 0);
}
else
if (expand_arguments)
{
- uschar *s = cmd;
- uschar *p = Ustrstr(cmd, "pipe_addresses");
+ uschar * p = Ustrstr(cmd, "pipe_addresses");
gstring * g = NULL;
DEBUG(D_transport)