--- lmtp2nntp_main.c 2002/03/13 16:22:09 1.52
+++ lmtp2nntp_main.c 2002/03/28 10:02:53 1.53
@@ -1633,11 +1633,24 @@
argz_add(&azErr, &asErr, errorstring);
for (i = 0; i < ctx->nns; i++) {
if (ctx->pns[i].rc != NNTP_OK) {
+ var_rc_t var_rc;
+ char *res_ptr;
+ int res_len;
str_format(errorstring, sizeof(errorstring),
- "${option.destination[%d]} returned %s\n"
- "${option.destination[%d]} lastresp \"%s\"",
- i, nntp_error(ctx->pns[i].rc),
- i, nntp_lastresp(ctx->pns[i].nntp));
+ "${option.destination[%d]} returned %s\n"
+ "${option.destination[%d]} lastresp \"%s\"",
+ i, nntp_error(ctx->pns[i].rc),
+ i, nntp_lastresp(ctx->pns[i].nntp));
+ if ((var_rc = var_expand(ctx->config_varctx, errorstring, strlen(errorstring), &res_ptr, &res_len, FALSE)) != VAR_OK) {
+ str_format(errorstring, sizeof(errorstring),
+ "destination[%d] returned %s\n"
+ "destination[%d] lastresp \"%s\"",
+ i, nntp_error(ctx->pns[i].rc),
+ i, nntp_lastresp(ctx->pns[i].nntp));
+ }
+ else {
+ str_copy(errorstring, res_ptr, sizeof(errorstring) < res_len ? sizeof(errorstring) : res_len);
+ }
argz_add(&azErr, &asErr, errorstring);
}
}
|