Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
map-agent
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-agent
Commits
1058b814
Commit
1058b814
authored
3 years ago
by
Jakob Olsson
Browse files
Options
Downloads
Patches
Plain Diff
add timer debugging and dynamic upgrade ubus methods
parent
5790862a
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Pipeline
#45130
failed
3 years ago
Stage: static_code_analysis
Stage: compile_test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/agent_ubus.c
+35
-0
35 additions, 0 deletions
src/agent_ubus.c
with
35 additions
and
0 deletions
src/agent_ubus.c
+
35
−
0
View file @
1058b814
...
@@ -895,6 +895,39 @@ static int cmd(struct ubus_context *ctx, struct ubus_object *obj,
...
@@ -895,6 +895,39 @@ static int cmd(struct ubus_context *ctx, struct ubus_object *obj,
return
UBUS_STATUS_OK
;
return
UBUS_STATUS_OK
;
}
}
static
int
agent_timers
(
struct
ubus_context
*
ctx
,
struct
ubus_object
*
obj
,
struct
ubus_request_data
*
req
,
const
char
*
method
,
struct
blob_attr
*
msg
)
{
struct
blob_buf
bb
;
struct
agent
*
a
=
container_of
(
obj
,
struct
agent
,
obj
);
memset
(
&
bb
,
0
,
sizeof
(
bb
));
blob_buf_init
(
&
bb
,
0
);
blobmsg_add_u32
(
&
bb
,
"autoconfig_trigger"
,
uloop_timeout_remaining
(
&
a
->
autocfg_dispatcher
));
blobmsg_add_u32
(
&
bb
,
"dynamic_backhaul_upgrade"
,
uloop_timeout_remaining
(
&
a
->
upgrade_backhaul_scheduler
));
blobmsg_add_u32
(
&
bb
,
"disconnect_timer"
,
uloop_timeout_remaining
(
&
a
->
disconnect_timer
));
blobmsg_add_u32
(
&
bb
,
"disable_unconnected_bstas_scheduler"
,
uloop_timeout_remaining
(
&
a
->
disable_unconnected_bstas_scheduler
));
blobmsg_add_u32
(
&
bb
,
"onboarding_scheduler"
,
uloop_timeout_remaining
(
&
a
->
onboarding_scheduler
));
ubus_send_reply
(
ctx
,
req
,
bb
.
head
);
blob_buf_free
(
&
bb
);
return
UBUS_STATUS_OK
;
}
static
int
agent_trigger_dynamic_upgrade
(
struct
ubus_context
*
ctx
,
struct
ubus_object
*
obj
,
struct
ubus_request_data
*
req
,
const
char
*
method
,
struct
blob_attr
*
msg
)
{
struct
blob_buf
bb
;
struct
agent
*
a
=
container_of
(
obj
,
struct
agent
,
obj
);
if
(
uloop_timeout_remaining
(
&
a
->
upgrade_backhaul_scheduler
)
>
0
)
uloop_timeout_set
(
&
a
->
upgrade_backhaul_scheduler
,
0
);
return
UBUS_STATUS_OK
;
}
static
int
agent_status
(
struct
ubus_context
*
ctx
,
struct
ubus_object
*
obj
,
static
int
agent_status
(
struct
ubus_context
*
ctx
,
struct
ubus_object
*
obj
,
struct
ubus_request_data
*
req
,
const
char
*
method
,
struct
ubus_request_data
*
req
,
const
char
*
method
,
struct
blob_attr
*
msg
)
struct
blob_attr
*
msg
)
...
@@ -1188,6 +1221,8 @@ int agent_publish_object(struct agent *a, const char *objname)
...
@@ -1188,6 +1221,8 @@ int agent_publish_object(struct agent *a, const char *objname)
#ifdef AGENT_SYNC_DYNAMIC_CNTLR_CONFIG
#ifdef AGENT_SYNC_DYNAMIC_CNTLR_CONFIG
UBUS_METHOD_NOARG
(
"sync"
,
sync_dyn_controller_config
),
UBUS_METHOD_NOARG
(
"sync"
,
sync_dyn_controller_config
),
#endif
#endif
UBUS_METHOD_NOARG
(
"timers"
,
agent_timers
),
UBUS_METHOD_NOARG
(
"dynamic_backhaul_upgrade"
,
agent_trigger_dynamic_upgrade
),
};
};
int
num_methods
=
ARRAY_SIZE
(
m
);
int
num_methods
=
ARRAY_SIZE
(
m
);
struct
ubus_object_type
*
obj_type
;
struct
ubus_object_type
*
obj_type
;
...
...
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