OSSP CVS Repository

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

Check-in Number: 842
Date: 2001-Sep-04 16:56:25 (local)
2001-Sep-04 14:56:25 (UTC)
User:rse
Branch:
Comment: cleanup level API (no need for retrieving old mask just in one function - either in all or in none).
Tickets:
Inspections:
Files:
ossp-pkg/l2/l2.h      1.13 -> 1.14     3 inserted, 3 deleted
ossp-pkg/l2/l2_stream.c      1.9 -> 1.10     1 inserted, 3 deleted
ossp-pkg/l2/l2_test.c      1.9 -> 1.10     1 inserted, 1 deleted

ossp-pkg/l2/l2.h 1.13 -> 1.14

--- l2.h 2001/09/04 13:52:59     1.13
+++ l2.h 2001/09/04 14:56:25     1.14
@@ -169,9 +169,9 @@
 l2_stream_t  *l2_stream_create    (void);
 l2_result_t   l2_stream_channel   (l2_stream_t *st, l2_channel_t *ch, unsigned int levelmask);
 l2_result_t   l2_stream_formatter (l2_stream_t *st, char id, l2_formatter_t cb, l2_context_t *ctx);
-l2_result_t   l2_stream_levels    (l2_stream_t *st, unsigned int levelmask, unsigned int *levelmaskold);
-l2_result_t   l2_stream_log       (l2_stream_t *st, unsigned int log_level, const char *fmt, ...);
-l2_result_t   l2_stream_vlog      (l2_stream_t *st, unsigned int log_level, const char *fmt, va_list ap);
+l2_result_t   l2_stream_levels    (l2_stream_t *st, unsigned int levelmask);
+l2_result_t   l2_stream_log       (l2_stream_t *st, unsigned int level, const char *fmt, ...);
+l2_result_t   l2_stream_vlog      (l2_stream_t *st, unsigned int level, const char *fmt, va_list ap);
 l2_result_t   l2_stream_destroy   (l2_stream_t *st);
 
 /* utility operations */


ossp-pkg/l2/l2_stream.c 1.9 -> 1.10

--- l2_stream.c  2001/09/04 14:17:11     1.9
+++ l2_stream.c  2001/09/04 14:56:25     1.10
@@ -77,12 +77,10 @@
     return L2_OK;
 }
 
-l2_result_t l2_stream_levels(l2_stream_t *st, unsigned int levelmask, unsigned int *levelmaskold)
+l2_result_t l2_stream_levels(l2_stream_t *st, unsigned int levelmask)
 {
     if (st == NULL)
         return L2_ERROR;
-    if (levelmaskold != NULL)
-        *levelmaskold = st->levelmask;
     st->levelmask = levelmask;
     return L2_OK;
 }


ossp-pkg/l2/l2_test.c 1.9 -> 1.10

--- l2_test.c    2001/09/04 14:46:12     1.9
+++ l2_test.c    2001/09/04 14:56:25     1.10
@@ -88,7 +88,7 @@
     if (l2_stream_channel(st, chBuf, L2_LEVEL_UPTO(L2_LEVEL_WARNING)) != L2_OK)
         die("failed to attach channel into stream");
 
-    if (l2_stream_levels(st, L2_LEVEL_UPTO(L2_LEVEL_WARNING), NULL) != L2_OK)
+    if (l2_stream_levels(st, L2_LEVEL_UPTO(L2_LEVEL_WARNING)) != L2_OK)
         die("failed to set global logging level");
     
     if (l2_stream_formatter(st, 'k', formatter, NULL) != L2_OK)

CVSTrac 2.0.1