projects
/
freeradius.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6d2a430
)
rlm_rediswho: allow insert/trim/expire to be configured independently
author
Brian Candler
<b.candler@pobox.com>
Thu, 14 Feb 2013 12:52:30 +0000
(12:52 +0000)
committer
Brian Candler
<b.candler@pobox.com>
Thu, 14 Feb 2013 16:31:34 +0000
(16:31 +0000)
For example you might want to do SET and EXPIRE on a start record,
and just EXPIRE on interim and stop.
src/modules/rlm_rediswho/rlm_rediswho.c
patch
|
blob
|
history
diff --git
a/src/modules/rlm_rediswho/rlm_rediswho.c
b/src/modules/rlm_rediswho/rlm_rediswho.c
index
ad67d53
..
159c8c2
100644
(file)
--- a/
src/modules/rlm_rediswho/rlm_rediswho.c
+++ b/
src/modules/rlm_rediswho/rlm_rediswho.c
@@
-67,6
+67,10
@@
static int rediswho_command(const char *fmt, REDISSOCK **dissocket_p,
char query[MAX_STRING_LEN * 4];
int result = 0;
+ if (!fmt) {
+ return 0;
+ }
+
/*
* Do an xlat on the provided string
*/
@@
-183,8
+187,6
@@
static int rediswho_accounting_all(REDISSOCK **dissocket_p,
REDISSOCK *dissocket;
int result;
- if (!insert || !trim || !expire) return 0;
-
result = rediswho_command(insert, dissocket_p, inst, request);
if (result < 0) {
return RLM_MODULE_FAIL;