projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
afea0f7
)
SUBST: fix double linked list handling for contexts.
author
Wilfried Goesgens
<dothebart@citadel.org>
Sun, 4 Nov 2012 13:23:47 +0000
(14:23 +0100)
committer
Wilfried Goesgens
<dothebart@citadel.org>
Sun, 4 Nov 2012 13:23:47 +0000
(14:23 +0100)
webcit/subst.c
patch
|
blob
|
history
diff --git
a/webcit/subst.c
b/webcit/subst.c
index 02de06103b982a2baa6a7762c6c524987eba9684..c3b094874778772db7758442a2e70036e6c8cf2b 100644
(file)
--- a/
webcit/subst.c
+++ b/
webcit/subst.c
@@
-163,6
+163,8
@@
void StackDynamicContext(WCTemplputParams *Super,
Sub->Sub = Super->Sub;
Super->Sub = Sub;
}
Sub->Sub = Super->Sub;
Super->Sub = Sub;
}
+ if (Sub->Sub != NULL)
+ Sub->Sub->Super = Sub;
Sub->Super = Super;
Sub->Context = Context;
Sub->Super = Super;
Sub->Context = Context;
@@
-179,6
+181,10
@@
void UnStackContext(WCTemplputParams *Sub)
{
Sub->Super->Sub = Sub->Sub;
}
{
Sub->Super->Sub = Sub->Sub;
}
+ if (Sub->Sub != NULL)
+ {
+ Sub->Sub->Super = Sub->Super;
+ }
}
void UnStackDynamicContext(StrBuf *Target, WCTemplputParams **TPP)
{
}
void UnStackDynamicContext(StrBuf *Target, WCTemplputParams **TPP)
{
@@
-315,9
+321,6
@@
void LogTemplateError (StrBuf *Target, const char *Type, int ErrorPos, WCTemplpu
*/
}
*/
}
-
-
-
void LogError (StrBuf *Target, const char *Type, const char *Format, ...)
{
wcsession *WCC;
void LogError (StrBuf *Target, const char *Type, const char *Format, ...)
{
wcsession *WCC;
@@
-2254,10
+2257,12
@@
int EvaluateConditional(StrBuf *Target, int Neg, int state, WCTemplputParams **T
res = Cond->CondF(Target, TP);
if (res == Neg)
rc = TP->Tokens->Params[1]->lvalue;
res = Cond->CondF(Target, TP);
if (res == Neg)
rc = TP->Tokens->Params[1]->lvalue;
+
if (LoadTemplates > 5)
syslog(1, "<%s> : %d %d==%d\n",
ChrPtr(TP->Tokens->FlatToken),
rc, res, Neg);
if (LoadTemplates > 5)
syslog(1, "<%s> : %d %d==%d\n",
ChrPtr(TP->Tokens->FlatToken),
rc, res, Neg);
+
if (TP->Sub != NULL)
{
*TPP = TP->Sub;
if (TP->Sub != NULL)
{
*TPP = TP->Sub;