#include <assert.h>
#ifndef _WIN32
-#ifndef __OS2__
#include <unistd.h>
-#endif /* ndef __OS2__ */
#include <netinet/in.h>
#else
#include <winsock2.h>
#endif /* ndef _WIN32 */
-#ifdef __OS2__
-#include <utils.h>
-#endif /* def __OS2__ */
-
#include "project.h"
#include "filters.h"
#include "encode.h"
if (b->dynamic) pcrs_free_joblist(joblist);
log_error(LOG_LEVEL_RE_FILTER,
- "filtering %s%s (size %d) with \'%s\' produced %d hits (new size %d).",
+ "filtering %s%s (size %lu) with \'%s\' produced %d hits (new size %lu).",
csp->http->hostport, csp->http->path, prev_size, b->name, current_hits, size);
#ifdef FEATURE_EXTENDED_STATISTICS
update_filter_statistics(b->name, current_hits);
*/
if ((*size != 0) && fwrite(content, *size, 1, fp) != 1)
{
- log_error(LOG_LEVEL_ERROR, "fwrite(..., %d, 1, ..) failed: %E", *size);
+ log_error(LOG_LEVEL_ERROR, "fwrite(..., %lu, 1, ..) failed: %E", *size);
unlink(file_name);
fclose(fp);
return NULL;
{
log_error(LOG_LEVEL_RE_FILTER,
"Executing '%s' resulted in return value %d. "
- "Read %d of up to %d bytes.", name, (ret >> 8), new_size, *size);
+ "Read %lu of up to %lu bytes.", name, (ret >> 8), new_size, *size);
}
unlink(file_name);
}
else
{
- log_error(LOG_LEVEL_DEANIMATE, "Success! GIF shrunk from %d bytes to %d.", size, out->offset);
+ log_error(LOG_LEVEL_DEANIMATE,
+ "Success! GIF shrunk from %lu bytes to %lu.", size, out->offset);
}
csp->content_length = out->offset;
csp->flags |= CSP_FLAG_MODIFIED;
{
char *filter;
unsigned long long executions;
- unsigned long long pages_modified;
+ unsigned long long response_bodies_modified;
unsigned long long hits;
struct filter_statistics_entry *next;
entry->executions++;
if (hits != 0)
{
- entry->pages_modified++;
+ entry->response_bodies_modified++;
entry->hits += (unsigned)hits;
}
break;
* Parameters :
* 1 : filter = Name of the filter to get statistics for.
* 2 : executions = Storage for the execution count.
- * 3 : pages_modified = Storage for the number of modified pages.
+ * 3 : response_bodies_modified = Storage for the number
+ * of modified response bodies.
* 4 : hits = Storage for the number of hits.
*
* Returns : void
*
*********************************************************************/
void get_filter_statistics(const char *filter, unsigned long long *executions,
- unsigned long long *pages_modified,
+ unsigned long long *response_bodies_modified,
unsigned long long *hits)
{
struct filter_statistics_entry *entry;
if (!strcmp(entry->filter, filter))
{
*executions = entry->executions;
- *pages_modified = entry->pages_modified;
+ *response_bodies_modified = entry->response_bodies_modified;
*hits = entry->hits;
break;
}