summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordberg.se>2010-05-24 23:34:58 +0200
committerLinus Nordberg <linus@nordberg.se>2010-05-24 23:34:58 +0200
commitaba526eda809e1d68ff70422f99039faff0e7b18 (patch)
tree953fbd5565cceb7a2e6d22e0e8a211d17ad472a6
parent8aa05d366de8af2543cb2533b14fe317fa11e7a0 (diff)
* radsecproxy.c: Fix typo introduced in 4779686 making rewrite a null
operation altogether.
-rw-r--r--radsecproxy.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/radsecproxy.c b/radsecproxy.c
index 09adf63..cacf9d6 100644
--- a/radsecproxy.c
+++ b/radsecproxy.c
@@ -1094,18 +1094,16 @@ int dorewritemod(struct radmsg *msg, struct list *modattrs) {
int dorewrite(struct radmsg *msg, struct rewrite *rewrite) {
int rv = 1; /* Success. */
- if (rewrite)
- return 1;
-
- if (rewrite->removeattrs || rewrite->removevendorattrs)
- dorewriterm(msg, rewrite->removeattrs, rewrite->removevendorattrs);
- if (rewrite->modattrs)
- if (!dorewritemod(msg, rewrite->modattrs))
- rv = 0;
- if (rewrite->addattrs)
- if (!dorewriteadd(msg, rewrite->addattrs))
- rv = 0;
-
+ if (rewrite) {
+ if (rewrite->removeattrs || rewrite->removevendorattrs)
+ dorewriterm(msg, rewrite->removeattrs, rewrite->removevendorattrs);
+ if (rewrite->modattrs)
+ if (!dorewritemod(msg, rewrite->modattrs))
+ rv = 0;
+ if (rewrite->addattrs)
+ if (!dorewriteadd(msg, rewrite->addattrs))
+ rv = 0;
+ }
return rv;
}