-const char filters_rcs[] = "$Id: filters.c,v 1.173 2012/10/05 12:15:39 fabiankeil Exp $";
+const char filters_rcs[] = "$Id: filters.c,v 1.174 2012/10/21 12:35:15 fabiankeil Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/filters.c,v $
 
    csp->flags |= CSP_FLAG_MODIFIED;
    csp->content_length = size;
-   IOB_RESET(csp->iob);
+   clear_iob(csp->iob);
 
    return(new);
 
 
-const char jcc_rcs[] = "$Id: jcc.c,v 1.399 2012/10/21 12:53:33 fabiankeil Exp $";
+const char jcc_rcs[] = "$Id: jcc.c,v 1.400 2012/10/21 12:56:38 fabiankeil Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/jcc.c,v $
       {
          return;
       }
-      IOB_RESET(csp->client_iob);
+      clear_iob(csp->client_iob);
    }
 
    log_error(LOG_LEVEL_CONNECT, "to %s successful", http->hostport);
    csp->expected_content_length = 0;
    csp->expected_client_content_length = 0;
    list_remove_all(csp->headers);
-   IOB_RESET(csp->iob);
+   clear_iob(csp->iob);
    freez(csp->error_message);
    free_http_request(csp->http);
    destroy_list(csp->headers);
        * Freeing the buffer itself isn't technically necessary,
        * but makes debugging more convenient.
        */
-      IOB_RESET(csp->client_iob);
+      clear_iob(csp->client_iob);
    }
 }
 #endif /* def FEATURE_CONNECTION_KEEP_ALIVE */
 
-const char parsers_rcs[] = "$Id: parsers.c,v 1.256 2012/10/17 18:19:59 fabiankeil Exp $";
+const char parsers_rcs[] = "$Id: parsers.c,v 1.257 2012/10/21 12:39:27 fabiankeil Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/parsers.c,v $
 }
 
 
+/*********************************************************************
+ *
+ * Function    :  clear_iob
+ *
+ * Description :  Frees the memory allocated for an I/O buffer and
+ *                resets the structure.
+ *
+ * Parameters  :
+ *          1  :  iob = I/O buffer to clear.
+ *
+ * Returns     :  JB_ERR_OK on success, JB_ERR_MEMORY if out-of-memory
+ *                or buffer limit reached.
+ *
+ *********************************************************************/
+void clear_iob(struct iob *iob)
+{
+   free(iob->buf);
+   memset(iob, '\0', sizeof(*iob));;
+}
+
+
 #ifdef FEATURE_ZLIB
 /*********************************************************************
  *
 
 #ifndef PARSERS_H_INCLUDED
 #define PARSERS_H_INCLUDED
-#define PARSERS_H_VERSION "$Id: parsers.h,v 1.52 2012/09/04 08:33:31 fabiankeil Exp $"
+#define PARSERS_H_VERSION "$Id: parsers.h,v 1.53 2012/10/21 12:39:27 fabiankeil Exp $"
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/parsers.h,v $
 
 extern long flush_socket(jb_socket fd, struct iob *iob);
 extern jb_err add_to_iob(struct iob *iob, const size_t buffer_limit, char *src, long n);
+extern void clear_iob(struct iob *iob);
 extern jb_err decompress_iob(struct client_state *csp);
 extern char *get_header(struct iob *iob);
 extern char *get_header_value(const struct list *header_list, const char *header_name);
 
 #ifndef PROJECT_H_INCLUDED
 #define PROJECT_H_INCLUDED
 /** Version string. */
-#define PROJECT_H_VERSION "$Id: project.h,v 1.187 2012/10/21 12:53:33 fabiankeil Exp $"
+#define PROJECT_H_VERSION "$Id: project.h,v 1.188 2012/10/21 12:56:38 fabiankeil Exp $"
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/project.h,v $
 #define IOB_PEEK(IOB) ((IOB->cur > IOB->eod) ? (IOB->eod - IOB->cur) : 0)
 
 
-/**
- * Remove any data in the I/O buffer associated with the passed
- * client_state pointer.
- */
-#define IOB_RESET(IOB) do {free(IOB->buf); memset(IOB, '\0', sizeof(*IOB));} while (0)
-
 /* Bits for csp->content_type bitmask: */
 #define CT_TEXT    0x0001U /**< Suitable for pcrs filtering. */
 #define CT_GIF     0x0002U /**< Suitable for GIF filtering.  */