This should make debugging various parsing issues a lot easier.
-const char errlog_rcs[] = "$Id: errlog.c,v 1.106 2010/07/26 11:21:47 fabiankeil Exp $";
+const char errlog_rcs[] = "$Id: errlog.c,v 1.107 2010/07/26 11:24:34 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/errlog.c,v $
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/errlog.c,v $
case LOG_LEVEL_LOG:
log_level_string = "Writing";
break;
case LOG_LEVEL_LOG:
log_level_string = "Writing";
break;
+ case LOG_LEVEL_RECEIVED:
+ log_level_string = "Received";
+ break;
case LOG_LEVEL_HEADER:
log_level_string = "Header";
break;
case LOG_LEVEL_HEADER:
log_level_string = "Header";
break;
#ifndef ERRLOG_H_INCLUDED
#define ERRLOG_H_INCLUDED
#ifndef ERRLOG_H_INCLUDED
#define ERRLOG_H_INCLUDED
-#define ERRLOG_H_VERSION "$Id: errlog.h,v 1.23 2009/05/16 13:27:20 fabiankeil Exp $"
+#define ERRLOG_H_VERSION "$Id: errlog.h,v 1.24 2010/07/21 14:43:03 fabiankeil Exp $"
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/errlog.h,v $
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/errlog.h,v $
#define LOG_LEVEL_CLF 0x0200 /* Common Log File format */
#define LOG_LEVEL_CRUNCH 0x0400
#define LOG_LEVEL_CGI 0x0800 /* CGI / templates */
#define LOG_LEVEL_CLF 0x0200 /* Common Log File format */
#define LOG_LEVEL_CRUNCH 0x0400
#define LOG_LEVEL_CGI 0x0800 /* CGI / templates */
+#define LOG_LEVEL_RECEIVED 0x8000
/* Following are always on: */
#define LOG_LEVEL_INFO 0x1000
/* Following are always on: */
#define LOG_LEVEL_INFO 0x1000
-const char jbsockets_rcs[] = "$Id: jbsockets.c,v 1.76 2010/06/13 12:30:10 fabiankeil Exp $";
+const char jbsockets_rcs[] = "$Id: jbsockets.c,v 1.77 2010/07/26 11:26:26 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/jbsockets.c,v $
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/jbsockets.c,v $
*********************************************************************/
int read_socket(jb_socket fd, char *buf, int len)
{
*********************************************************************/
int read_socket(jb_socket fd, char *buf, int len)
{
if (len <= 0)
{
return(0);
}
#if defined(_WIN32)
if (len <= 0)
{
return(0);
}
#if defined(_WIN32)
- return(recv(fd, buf, len, 0));
+ ret = recv(fd, buf, len, 0);
#elif defined(__BEOS__) || defined(AMIGA) || defined(__OS2__)
#elif defined(__BEOS__) || defined(AMIGA) || defined(__OS2__)
- return(recv(fd, buf, (size_t)len, 0));
+ ret = recv(fd, buf, (size_t)len, 0);
- return((int)read(fd, buf, (size_t)len));
+ ret = (int)read(fd, buf, (size_t)len);
+
+ if (ret > 0)
+ {
+ log_error(LOG_LEVEL_RECEIVED, "from socket %d: %N", fd, ret, buf);
+ }
+
+ return ret;