projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4ba4633
)
Small API change to previous commit
author
Art Cancro
<ajc@uncensored.citadel.org>
Tue, 28 Feb 2012 16:16:38 +0000
(11:16 -0500)
committer
Art Cancro
<ajc@uncensored.citadel.org>
Tue, 28 Feb 2012 16:16:38 +0000
(11:16 -0500)
citadel/modules/sieve/serv_sieve.c
patch
|
blob
|
history
diff --git
a/citadel/modules/sieve/serv_sieve.c
b/citadel/modules/sieve/serv_sieve.c
index 8827be41644a35baac7c95139014af014a43cac0..b52bb3bdb51ecaf4ac8a08be9bfe5faa87b87e47 100644
(file)
--- a/
citadel/modules/sieve/serv_sieve.c
+++ b/
citadel/modules/sieve/serv_sieve.c
@@
-450,12
+450,13
@@
int ctdl_getsize(sieve2_context_t *s, void *my)
/*
/*
- * Return a pointer to the active Sieve script
+ * Return a pointer to the active Sieve script.
+ * (Caller does NOT own the memory and should not free the returned pointer.)
*/
*/
-char *get_active_script(struct
ctdl_sieve *cs
) {
+char *get_active_script(struct
sdm_userdata *u
) {
struct sdm_script *sptr;
struct sdm_script *sptr;
- for (sptr=
cs->
u->first_script; sptr!=NULL; sptr=sptr->next) {
+ for (sptr=u->first_script; sptr!=NULL; sptr=sptr->next) {
if (sptr->script_active > 0) {
syslog(LOG_DEBUG, "get_active_script() is using script '%s'", sptr->script_name);
return(sptr->script_content);
if (sptr->script_active > 0) {
syslog(LOG_DEBUG, "get_active_script() is using script '%s'", sptr->script_name);
return(sptr->script_content);
@@
-473,7
+474,7
@@
char *get_active_script(struct ctdl_sieve *cs) {
int ctdl_getscript(sieve2_context_t *s, void *my) {
struct ctdl_sieve *cs = (struct ctdl_sieve *)my;
int ctdl_getscript(sieve2_context_t *s, void *my) {
struct ctdl_sieve *cs = (struct ctdl_sieve *)my;
- char *active_script = get_active_script(cs);
+ char *active_script = get_active_script(cs
->u
);
if (active_script != NULL) {
sieve2_setvalue_string(s, "script", active_script);
return SIEVE2_OK;
if (active_script != NULL) {
sieve2_setvalue_string(s, "script", active_script);
return SIEVE2_OK;