|
|
@@ -0,0 +1,24 @@
|
|
|
+This patch makes sure that OSSP l2's "prefix" channel performs a single
|
|
|
+downstream write operation to make sure the leaf "file" channel has a
|
|
|
+chance to atomically write the message to the logfile. This patch is
|
|
|
+from OSSP CVS and will be included in the next OSSP l2 and OSSP fsl
|
|
|
+versions, too.
|
|
|
+
|
|
|
+Index: lib_l2/l2_ch_prefix.c
|
|
|
+===================================================================
|
|
|
+diff -u -d -u -d -r1.23 l2_ch_prefix.c
|
|
|
+--- lib_l2/l2_ch_prefix.c 6 Jan 2003 11:41:51 -0000 1.23
|
|
|
++++ lib_l2/l2_ch_prefix.c 10 Sep 2003 12:37:43 -0000
|
|
|
+@@ -172,10 +172,12 @@
|
|
|
+ return L2_ERR_ARG;
|
|
|
+ if ((n = strftime(buf2, sizeof(buf2), buf1, tm)) == 0)
|
|
|
+ return L2_ERR_SYS;
|
|
|
++ n += l2_util_sprintf(buf2+n, sizeof(buf2)-n, "%s", buf);
|
|
|
+ downstream = NULL;
|
|
|
+ while ((rv = l2_channel_downstream(ch, &downstream)) == L2_OK)
|
|
|
+ if ((rv = l2_channel_write(downstream, level, buf2, n)) != L2_OK)
|
|
|
+ return rv;
|
|
|
++ return L2_OK;
|
|
|
+ }
|
|
|
+
|
|
|
+ return L2_OK_PASS;
|