OSSP CVS Repository

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

Check-in Number: 2427
Date: 2002-Jul-30 13:37:19 (local)
2002-Jul-30 11:37:19 (UTC)
User:thl
Branch:
Comment: log errors between l2_channel_create() and l2_channel_open()
Tickets:
Inspections:
Files:
ossp-pkg/fsl/fsl.c      1.38 -> 1.39     2 inserted, 3 deleted

ossp-pkg/fsl/fsl.c 1.38 -> 1.39

--- fsl.c        2002/07/30 10:08:08     1.38
+++ fsl.c        2002/07/30 11:37:19     1.39
@@ -200,9 +200,8 @@
     char cp[8];
 
     va_start(ap, message);
-    if (ctx.l2_fslnch != NULL)
-        l2_channel_vlog(ctx.l2_fslnch, level, message, ap);
-    else
+    /* note that a L2_ERR_USE is only returned by l2_channel_vlog() if the channel is not yet open */
+    if (ctx.l2_fslnch == NULL || (l2_channel_vlog(ctx.l2_fslnch, level, message, ap) == L2_ERR_USE))
         if (level & L2_LEVEL_UPTO(L2_LEVEL_ERROR)) {
             fprintf( stderr, "%s: ", l2_util_l2s(cp, sizeof(cp), '\0', level) == L2_OK ? cp[0]&=0xDF, cp : "Log");
             vfprintf(stderr, message, ap);

CVSTrac 2.0.1