OSSP CVS Repository

ossp - Difference in ossp-pkg/lmtp2nntp/lmtp2nntp_main.c versions 1.52 and 1.53
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/lmtp2nntp/lmtp2nntp_main.c 1.52 -> 1.53

--- 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);
             }
         }

CVSTrac 2.0.1