OSSP CVS Repository

ossp - Check-in [2297]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 2297
Date: 2002-Jul-17 13:28:06 (local)
2002-Jul-17 11:28:06 (UTC)
User:thl
Branch:
Comment: errno formatter is now part of l2
Tickets:
Inspections:
Files:
ossp-pkg/lmtp2nntp/lmtp2nntp_config.c      1.78 -> 1.79     1 inserted, 10 deleted

ossp-pkg/lmtp2nntp/lmtp2nntp_config.c 1.78 -> 1.79

--- lmtp2nntp_config.c   2002/07/02 07:49:01     1.78
+++ lmtp2nntp_config.c   2002/07/17 11:28:06     1.79
@@ -96,15 +96,6 @@
     return L2_OK;
 }
 
-static l2_result_t 
-formatter_errno(l2_context_t *_ctx, const char id, const char *param,
-          char *bufptr, size_t bufsize, size_t *buflen, va_list *ap)
-{
-    sprintf(bufptr, "(%d) %s", errno, strerror(errno));
-    *buflen = strlen(bufptr);
-    return L2_OK;
-}
-
 static var_syntax_t syntax_regex = {
     '\\',         /* escape        */ 
     '$',          /* varinit       */ 
@@ -143,7 +134,7 @@
         fprintf(stderr, "%s:Error: logging failed to register string formatter\n", ctx->progname);
         CU(ERR_EXECUTION);
     }
-    if (l2_env_formatter(ctx->l2_env, 'm', formatter_errno, NULL) != L2_OK) {
+    if (l2_env_formatter(ctx->l2_env, 'm', l2_util_fmt_errno, NULL) != L2_OK) {
         fprintf(stderr, "%s:Error: logging failed to register errno formatter\n", ctx->progname);
         CU(ERR_EXECUTION);
     }

CVSTrac 2.0.1