#include <common/hash.h>
#include <common/htx.h>
#include <common/initcall.h>
+#include <common/net_helper.h>
#define CACHE_FLT_F_IMPLICIT_DECL 0x00000001 /* The cache filtre was implicitly declared (ie without
* the filter keyword) */
struct eb32_node *node;
struct cache_entry *entry;
- node = eb32_lookup(&cache->entries, (*(unsigned int *)hash));
+ node = eb32_lookup(&cache->entries, read_u32(hash));
if (!node)
return NULL;
struct shared_context *shctx = shctx_ptr(cconf->c.cache);
struct cache_st *cache_ctx = NULL;
struct cache_entry *object, *old;
- unsigned int key = *(unsigned int *)txn->cache_hash;
+ unsigned int key = read_u32(txn->cache_hash);
struct htx *htx;
struct http_hdr_ctx ctx;
size_t hdrs_len = 0;
}
entry = container_of(node, struct cache_entry, eb);
- chunk_printf(&trash, "%p hash:%u size:%u (%u blocks), refcount:%u, expire:%d\n", entry, (*(unsigned int *)entry->hash), block_ptr(entry)->len, block_ptr(entry)->block_count, block_ptr(entry)->refcount, entry->expire - (int)now.tv_sec);
+ chunk_printf(&trash, "%p hash:%u size:%u (%u blocks), refcount:%u, expire:%d\n", entry, read_u32(entry->hash), block_ptr(entry)->len, block_ptr(entry)->block_count, block_ptr(entry)->refcount, entry->expire - (int)now.tv_sec);
next_key = node->key + 1;
appctx->ctx.cli.i0 = next_key;
#include <common/config.h>
#include <common/debug.h>
#include <common/htx.h>
+#include <common/net_helper.h>
#include <common/uri_auth.h>
#include <types/capture.h>
: 0);
txn->status = -1;
txn->errmsg = NULL;
- *(unsigned int *)txn->cache_hash = 0;
+ write_u32(txn->cache_hash, 0);
txn->cookie_first_date = 0;
txn->cookie_last_date = 0;