Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
map-controller
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Multi-AP
map-controller
Commits
1525f7bd
Commit
1525f7bd
authored
3 years ago
by
Jakob Olsson
Browse files
Options
Downloads
Patches
Plain Diff
agent radiolist memory cleanup
parent
aa814e1a
Branches
Branches containing commit
No related tags found
1 merge request
!108
Radiolist cleanup
Pipeline
#48075
passed
3 years ago
Stage: static_code_analysis
Stage: compile_test
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/config.c
+15
-14
15 additions, 14 deletions
src/config.c
with
15 additions
and
14 deletions
src/config.c
+
15
−
14
View file @
1525f7bd
...
@@ -126,14 +126,11 @@ static int clean_steer_excl(struct node_policy *p)
...
@@ -126,14 +126,11 @@ static int clean_steer_excl(struct node_policy *p)
return
0
;
return
0
;
}
}
int
clean_
agent_policies
(
struct
controller_config
*
cfg
)
int
clean_
radio_list
(
struct
list_head
*
radiolist
)
{
{
struct
node
_policy
*
p
=
NULL
,
*
tmp
;
struct
radio
_policy
*
p
=
NULL
,
*
tmp
;
list_for_each_entry_safe
(
p
,
tmp
,
&
cfg
->
nodelist
,
list
)
{
list_for_each_entry_safe
(
p
,
tmp
,
radiolist
,
list
)
{
clean_steer_btm_excl
(
p
);
clean_steer_excl
(
p
);
clean_agentlist
(
p
);
list_del
(
&
p
->
list
);
list_del
(
&
p
->
list
);
free
(
p
);
free
(
p
);
}
}
...
@@ -141,11 +138,15 @@ int clean_agent_policies(struct controller_config *cfg)
...
@@ -141,11 +138,15 @@ int clean_agent_policies(struct controller_config *cfg)
return
0
;
return
0
;
}
}
int
clean_
cred_list
(
struct
controller_config
*
cfg
)
int
clean_
agent_policies
(
struct
controller_config
*
cfg
)
{
{
struct
iface_credential
*
p
=
NULL
,
*
tmp
;
struct
node_policy
*
p
=
NULL
,
*
tmp
;
list_for_each_entry_safe
(
p
,
tmp
,
&
cfg
->
aplist
,
list
)
{
list_for_each_entry_safe
(
p
,
tmp
,
&
cfg
->
nodelist
,
list
)
{
clean_steer_btm_excl
(
p
);
clean_steer_excl
(
p
);
clean_agentlist
(
p
);
clean_radio_list
(
&
p
->
radiolist
);
list_del
(
&
p
->
list
);
list_del
(
&
p
->
list
);
free
(
p
);
free
(
p
);
}
}
...
@@ -153,11 +154,11 @@ int clean_cred_list(struct controller_config *cfg)
...
@@ -153,11 +154,11 @@ int clean_cred_list(struct controller_config *cfg)
return
0
;
return
0
;
}
}
int
clean_
radio
_list
(
struct
controller_config
*
cfg
)
int
clean_
cred
_list
(
struct
controller_config
*
cfg
)
{
{
struct
radio_policy
*
p
=
NULL
,
*
tmp
;
struct
iface_credential
*
p
=
NULL
,
*
tmp
;
list_for_each_entry_safe
(
p
,
tmp
,
&
cfg
->
radio
list
,
list
)
{
list_for_each_entry_safe
(
p
,
tmp
,
&
cfg
->
ap
list
,
list
)
{
list_del
(
&
p
->
list
);
list_del
(
&
p
->
list
);
free
(
p
);
free
(
p
);
}
}
...
@@ -1269,7 +1270,7 @@ uint8_t cntlr_config_reload(struct controller_config *cfg)
...
@@ -1269,7 +1270,7 @@ uint8_t cntlr_config_reload(struct controller_config *cfg)
/* clean old lists */
/* clean old lists */
clean_cred_list
(
&
old
);
clean_cred_list
(
&
old
);
clean_agent_policies
(
&
old
);
/* cleans nodelist */
clean_agent_policies
(
&
old
);
/* cleans nodelist */
clean_radio_list
(
&
old
);
clean_radio_list
(
&
old
.
radiolist
);
uci_free_context
(
ctx
);
uci_free_context
(
ctx
);
...
@@ -1280,6 +1281,6 @@ int cntlr_config_clean(struct controller_config *cfg)
...
@@ -1280,6 +1281,6 @@ int cntlr_config_clean(struct controller_config *cfg)
{
{
clean_cred_list
(
cfg
);
clean_cred_list
(
cfg
);
clean_agent_policies
(
cfg
);
/* cleans nodelist */
clean_agent_policies
(
cfg
);
/* cleans nodelist */
clean_radio_list
(
cfg
);
clean_radio_list
(
&
cfg
->
radiolist
);
return
0
;
return
0
;
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment