git://scientific.zcu.cz
/
jra1mw.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4ec34fd
)
fixed mgmt of authz rules
author
Daniel Kouřil
<kouril@ics.muni.cz>
Tue, 16 Mar 2010 16:51:27 +0000
(16:51 +0000)
committer
Daniel Kouřil
<kouril@ics.muni.cz>
Tue, 16 Mar 2010 16:51:27 +0000
(16:51 +0000)
org.glite.lb.common/src/context.c
patch
|
blob
|
blame
|
history
diff --git
a/org.glite.lb.common/src/context.c
b/org.glite.lb.common/src/context.c
index
7641ddc
..
ca3db1c
100644
(file)
--- a/
org.glite.lb.common/src/context.c
+++ b/
org.glite.lb.common/src/context.c
@@
-597,14
+597,15
@@
edg_wll_add_authz_rule(edg_wll_Context ctx,
char *attr_value)
{
struct _edg_wll_authz_rule *tmp = policy->rules;
+ int num = policy->num;
- tmp = realloc(tmp, (
policy->
num + 1) * sizeof(*tmp));
+ tmp = realloc(tmp, (num + 1) * sizeof(*tmp));
if (tmp == NULL)
return edg_wll_SetError(ctx, ENOMEM, NULL);;
- tmp
->
action = action;
- tmp
->
attr_id = attr_id;
- tmp
->
attr_value = strdup(attr_value);
+ tmp
[num].
action = action;
+ tmp
[num].
attr_id = attr_id;
+ tmp
[num].
attr_value = strdup(attr_value);
policy->rules = tmp;
policy->num++;