comparison src/send_digest.c @ 754:ecb991e41a4c

Add $controlN$ substitution The interfaces to substitute() and substitute_one() have changed, as they now need to know the listdir to be able to find control files
author Ben Schmidt
date Wed, 06 Oct 2010 23:30:26 +1100
parents b00eb39643c1
children c3ee2bfaeb02
comparison
equal deleted inserted replaced
753:b58fd7980358 754:ecb991e41a4c
261 261
262 chomp(line); 262 chomp(line);
263 utfsub = unistr_escaped_to_utf8(line + 9); 263 utfsub = unistr_escaped_to_utf8(line + 9);
264 } 264 }
265 265
266 utfsub2 = substitute(utfsub, listaddr, listdelim, 5, subst_data); 266 utfsub2 = substitute(utfsub, listaddr, listdelim, 5, subst_data, listdir);
267 subject = unistr_utf8_to_header(utfsub2); 267 subject = unistr_utf8_to_header(utfsub2);
268 myfree(utfsub); 268 myfree(utfsub);
269 myfree(utfsub2); 269 myfree(utfsub2);
270 270
271 tmp = concatstr(10, "From: ", listname, listdelim, "help@", listfqdn, 271 tmp = concatstr(10, "From: ", listname, listdelim, "help@", listfqdn,
360 do { 360 do {
361 utfline = unistr_escaped_to_utf8(line); 361 utfline = unistr_escaped_to_utf8(line);
362 myfree(line); 362 myfree(line);
363 363
364 tmp = substitute(utfline, listaddr, listdelim, 364 tmp = substitute(utfline, listaddr, listdelim,
365 5, subst_data); 365 5, subst_data, listdir);
366 myfree(utfline); 366 myfree(utfline);
367 367
368 if(writen(fd, tmp, strlen(tmp)) < 0) { 368 if(writen(fd, tmp, strlen(tmp)) < 0) {
369 myfree(tmp); 369 myfree(tmp);
370 log_error(LOG_ARGS, "Could not write" 370 log_error(LOG_ARGS, "Could not write"