X-Git-Url: http://www.privoxy.org/gitweb/?a=blobdiff_plain;f=jcc.c;h=347f35f4147c65690f4d0aaf0badd21b1e1a859a;hb=3a19d0fecf054afa4937b83267b21936d2d7fd44;hp=96575b02215cd9ae19a59952c737a3ea9dc18d2b;hpb=1d7f399a3bc43e93923bb7f6b965df4de2ee5b90;p=privoxy.git diff --git a/jcc.c b/jcc.c index 96575b02..347f35f4 100644 --- a/jcc.c +++ b/jcc.c @@ -1,4 +1,4 @@ -const char jcc_rcs[] = "$Id: jcc.c,v 1.35 2001/07/31 14:44:22 oes Exp $"; +const char jcc_rcs[] = "$Id: jcc.c,v 1.41 2001/09/16 17:05:14 jongfoster Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/jcc.c,v $ @@ -33,6 +33,24 @@ const char jcc_rcs[] = "$Id: jcc.c,v 1.35 2001/07/31 14:44:22 oes Exp $"; * * Revisions : * $Log: jcc.c,v $ + * Revision 1.41 2001/09/16 17:05:14 jongfoster + * Removing unused #include showarg.h + * + * Revision 1.40 2001/09/16 15:41:45 jongfoster + * Fixing signed/unsigned comparison warning. + * + * Revision 1.39 2001/09/16 13:21:27 jongfoster + * Changes to use new list functions. + * + * Revision 1.38 2001/09/16 13:01:46 jongfoster + * Removing redundant function call that zeroed zalloc()'d memory. + * + * Revision 1.37 2001/09/10 11:12:24 oes + * Deleted unused variable + * + * Revision 1.36 2001/09/10 10:56:15 oes + * Silenced compiler warnings + * * Revision 1.35 2001/07/31 14:44:22 oes * Deleted unused size parameter from filter_popups() * @@ -315,6 +333,10 @@ const char jcc_rcs[] = "$Id: jcc.c,v 1.35 2001/07/31 14:44:22 oes Exp $"; # include /* declarations for threads and stuff. */ # endif +# ifdef __EMX__ +# include /* OS/2/EMX needs a little help with select */ +# endif + # ifndef FD_ZERO # include # endif @@ -326,7 +348,6 @@ const char jcc_rcs[] = "$Id: jcc.c,v 1.35 2001/07/31 14:44:22 oes Exp $"; #include "jcc.h" #include "filters.h" #include "loaders.h" -#include "showargs.h" #include "parsers.h" #include "killpopup.h" #include "miscutil.h" @@ -421,7 +442,6 @@ static void chat(struct client_state *csp) char buf[BUFFER_SIZE]; char *hdr, *p, *req; - char *err = NULL; fd_set rfds; int n, maxfd, server_body; int ms_iis5_hack = 0; @@ -576,7 +596,7 @@ static void chat(struct client_state *csp) * vanilla wafer, then send the vanilla wafer. */ if ((csp->config->jarfile != NULL) - && (csp->action->multi[ACTION_MULTI_WAFER]->next == NULL) + && list_is_empty(csp->action->multi[ACTION_MULTI_WAFER]) && ((csp->action->flags & ACTION_VANILLA_WAFER) != 0)) { enlist(csp->action->multi[ACTION_MULTI_WAFER], VANILLA_WAFER); @@ -617,7 +637,7 @@ static void chat(struct client_state *csp) /* We have a request. */ hdr = sed(client_patterns, add_client_headers, csp); - destroy_list(csp->headers); + list_remove_all(csp->headers); /* * Now, check to see if we need to intercept it, i.e. @@ -911,7 +931,7 @@ static void chat(struct client_state *csp) n = strlen(hdr); if ((write_socket(csp->cfd, hdr, n) != n) - || (write_socket(csp->cfd, p != NULL ? p : csp->iob->cur, csp->content_length) != csp->content_length)) + || (write_socket(csp->cfd, p != NULL ? p : csp->iob->cur, csp->content_length) != (int)csp->content_length)) { log_error(LOG_LEVEL_CONNECT, "write modified content to client failed: %E"); return; @@ -1310,8 +1330,6 @@ static void listen_loop(void) continue; } - memset(csp, '\0', sizeof(*csp)); - csp->active = 1; csp->sfd = -1;