Skip to content
This repository has been archived by the owner on Mar 12, 2019. It is now read-only.

Commit

Permalink
log cache expiry
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan-Piet Mens committed Nov 3, 2014
1 parent 81287c6 commit 8047f28
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#include <openssl/evp.h>
#include <openssl/sha.h>
#include "uthash.h"
#include "log.h"

static unsigned int sha_hash(const char *data, size_t size, unsigned char *out)
{
Expand Down Expand Up @@ -97,7 +98,7 @@ void acl_cache(const char *clientid, const char *username, const char *topic, in
granted = a->granted;

if (time(NULL) > (a->seconds + cacheseconds)) {
printf("EXPIRED!!!!!!!!!!!!!\n");
_log(DEBUG, " Cache for (%s,%s,%d) [%s] Expired!", clientid, username, access,hex);
HASH_DEL(ud->aclcache, a);
}
} else {
Expand Down Expand Up @@ -126,7 +127,7 @@ int cache_q(const char *clientid, const char *username, const char *topic, int a
granted = a->granted;

if (time(NULL) > (a->seconds + cacheseconds)) {
printf("EXPIRED!!!!!!!!!!!!!\n");
_log(DEBUG, " Cache for (%s,%s,%d) [%s] Expired!", clientid, username, access,hex);
HASH_DEL(ud->aclcache, a);
}
}
Expand Down

0 comments on commit 8047f28

Please sign in to comment.