You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by hg...@apache.org on 2001/04/19 23:25:29 UTC
cvs commit: jakarta-tomcat/src/native/mod_jk/common jk_msg_buff.c jk_msg_buff.h
hgomez 01/04/19 14:25:28
Modified: src/native/mod_jk/common jk_msg_buff.c jk_msg_buff.h
Log:
Added jk_dump_msg helper function to help
dump what's in a jk_buff
Revision Changes Path
1.3 +24 -1 jakarta-tomcat/src/native/mod_jk/common/jk_msg_buff.c
Index: jk_msg_buff.c
===================================================================
RCS file: /home/cvs/jakarta-tomcat/src/native/mod_jk/common/jk_msg_buff.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- jk_msg_buff.c 2000/11/10 18:48:50 1.2
+++ jk_msg_buff.c 2001/04/19 21:25:27 1.3
@@ -57,7 +57,8 @@
* Description: Data marshaling. XDR like *
* Author: Costin <co...@costin.dnt.ro> *
* Author: Gal Shachor <sh...@il.ibm.com> *
- * Version: $Revision: 1.2 $ *
+ * Author: Henri Gomez <hg...@slib.fr> *
+ * Version: $Revision: 1.3 $ *
***************************************************************************/
#include "jk_pool.h"
@@ -65,6 +66,7 @@
#include "jk_util.h"
#include "jk_sockbuf.h"
#include "jk_msg_buff.h"
+#include "jk_logger.h"
struct jk_msg_buf {
jk_pool_t *pool;
@@ -330,3 +332,24 @@
*dst++ = *(src + 1 );
*dst= *src;
}
+
+/** Helpie dump function
+ */
+void jk_dump_buff(jk_logger_t *l,
+ const char *file,
+ int line,
+ int level,
+ char * what,
+ jk_msg_buf_t * msg)
+{
+#ifdef USE_ALSO_BODY
+ jk_log(l, file, line, level, "%s #%d %.*s\n",
+ what,
+ jk_b_get_len(msg),
+ jk_b_get_len(msg),
+ jk_b_get_buff(msg));
+#else
+jk_log(l, file, line, level, "%s #%d\n", what, jk_b_get_len(msg));
+#endif
+}
+
1.3 +9 -1 jakarta-tomcat/src/native/mod_jk/common/jk_msg_buff.h
Index: jk_msg_buff.h
===================================================================
RCS file: /home/cvs/jakarta-tomcat/src/native/mod_jk/common/jk_msg_buff.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- jk_msg_buff.h 2000/11/10 18:48:50 1.2
+++ jk_msg_buff.h 2001/04/19 21:25:27 1.3
@@ -57,7 +57,7 @@
* Description: Data marshaling. XDR like *
* Author: Costin <co...@costin.dnt.ro> *
* Author: Gal Shachor <sh...@il.ibm.com> *
- * Version: $Revision: 1.2 $ *
+ * Version: $Revision: 1.3 $ *
***************************************************************************/
#ifndef JK_MSG_BUF_H
@@ -183,6 +183,14 @@
unsigned char jk_b_pget_byte(jk_msg_buf_t *msg,
int pos);
+
+/* --------------------- Help ------------------------ */
+void jk_dump_buff(jk_logger_t *l,
+ const char *file,
+ int line,
+ int level,
+ char * what,
+ jk_msg_buf_t * msg);
#ifdef __cplusplus
}