[prev in list] [next in list] [prev in thread] [next in thread]
List: privoxy-commits
Subject: [privoxy-commits] current jcc.c,1.134,1.135
From: noreply () sourceforge ! net
Date: 2007-05-24 17:03:53
Message-ID: E1HrGjB-0008WQ-4d () mail ! sourceforge ! net
[Download RAW message or body]
Update of /cvsroot/ijbswa/current
In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv6995
Modified Files:
jcc.c
Log Message:
- Let usage() mention the --chroot parameter.
- Use read_socket() consistently and always leave
the last buffer byte alone, even in cases where
null termination (currently) doesn't matter.
Index: jcc.c
===================================================================
RCS file: /cvsroot/ijbswa/current/jcc.c,v
retrieving revision 1.134
retrieving revision 1.135
diff -u -d -r1.134 -r1.135
--- jcc.c 16 May 2007 14:59:46 -0000 1.134
+++ jcc.c 24 May 2007 17:03:50 -0000 1.135
@@ -33,6 +33,12 @@
*
* Revisions :
* $Log$
+ * Revision 1.135 2007/05/24 17:03:50 fabiankeil
+ * - Let usage() mention the --chroot parameter.
+ * - Use read_socket() consistently and always leave
+ * the last buffer byte alone, even in cases where
+ * null termination (currently) doesn't matter.
+ *
* Revision 1.134 2007/05/16 14:59:46 fabiankeil
* - Fix config file loading on Unix if no config file is specified.
* Since r1.97 Privoxy would always interpret the last argument as
@@ -1725,7 +1731,7 @@
for (;;)
{
- len = read_socket(csp->cfd, buf, sizeof(buf)-1);
+ len = read_socket(csp->cfd, buf, sizeof(buf) - 1);
if (len <= 0) break; /* error! */
@@ -1820,7 +1826,7 @@
{
if ( ( ( p = get_header(csp) ) != NULL) && ( *p == '\0' ) )
{
- len = read_socket(csp->cfd, buf, sizeof(buf));
+ len = read_socket(csp->cfd, buf, sizeof(buf) - 1);
if (len <= 0)
{
log_error(LOG_LEVEL_ERROR, "read from client failed: %E");
@@ -2077,7 +2083,7 @@
/* Write the answer to the client */
- if(rsp != NULL)
+ if (rsp != NULL)
{
send_crunch_response(csp, rsp);
}
@@ -2165,7 +2171,7 @@
if (FD_ISSET(csp->cfd, &rfds))
{
- len = read_socket(csp->cfd, buf, sizeof(buf));
+ len = read_socket(csp->cfd, buf, sizeof(buf) - 1);
if (len <= 0)
{
@@ -2645,11 +2651,15 @@
void usage(const char *myname)
{
printf("Privoxy version " VERSION " (" HOME_PAGE_URL ")\n"
- "Usage: %s [--help] [--version] "
+ "Usage: %s "
+#if defined(unix)
+ "[--chroot] "
+#endif /* defined(unix) */
+ "[--help] "
#if defined(unix)
"[--no-daemon] [--pidfile pidfile] [--user user[.group]] "
#endif /* defined(unix) */
- "[configfile]\n"
+ "[--version] [configfile]\n"
"Aborting\n", myname);
exit(2);
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
ijbswa-commits mailing list
ijbswa-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ijbswa-commits
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic