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
afc25c52
Commit
afc25c52
authored
1 month ago
by
Jakob Olsson
Browse files
Options
Downloads
Patches
Plain Diff
dynbhd: use base 10 for stroul when reading mid
parent
cdf31e4c
Branches
Branches containing commit
No related tags found
1 merge request
!742
Dynbh oper state
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/dynbh/dynbh.c
+4
-6
4 additions, 6 deletions
src/dynbh/dynbh.c
with
4 additions
and
6 deletions
src/dynbh/dynbh.c
+
4
−
6
View file @
afc25c52
...
@@ -186,10 +186,8 @@ static void bridge_readd(atimer_t *t)
...
@@ -186,10 +186,8 @@ static void bridge_readd(atimer_t *t)
/* callback to send ap autoconfig search */
/* callback to send ap autoconfig search */
static
void
send_apconf_cb
(
atimer_t
*
t
)
static
void
send_apconf_cb
(
atimer_t
*
t
)
{
{
struct
ethport
*
ap
=
container_of
(
t
,
struct
ethport
,
struct
ethport
*
ap
=
container_of
(
t
,
struct
ethport
,
send_apconf
);
send_apconf
);
char
mid
[
16
]
=
{
0
};
char
mid
[
16
]
=
{
0
};
char
*
endptr
=
NULL
;
fprintf
(
stderr
,
"|%s:%d| sending query num %d for ifname:%s alid:%s
\n
"
,
__func__
,
__LINE__
,
(
ap
->
num_mid
+
1
),
ap
->
ifname
,
ap
->
ctx
->
alidstr
);
fprintf
(
stderr
,
"|%s:%d| sending query num %d for ifname:%s alid:%s
\n
"
,
__func__
,
__LINE__
,
(
ap
->
num_mid
+
1
),
ap
->
ifname
,
ap
->
ctx
->
alidstr
);
runCmd
(
"[ -n
\"
$(ubus list ieee1905.al.%s)
\"
] || ubus call ieee1905 add_interface '{
\"
ifname
\"
:
\"
%s
\"
}'"
,
ap
->
ifname
,
ap
->
ifname
);
runCmd
(
"[ -n
\"
$(ubus list ieee1905.al.%s)
\"
] || ubus call ieee1905 add_interface '{
\"
ifname
\"
:
\"
%s
\"
}'"
,
ap
->
ifname
,
ap
->
ifname
);
...
@@ -201,12 +199,12 @@ ubus call ieee1905 cmdu '{"ifname":"eth0", "dst":"01:80:C2:00:00:13", "type":7,
...
@@ -201,12 +199,12 @@ ubus call ieee1905 cmdu '{"ifname":"eth0", "dst":"01:80:C2:00:00:13", "type":7,
runCmd
(
"ubus list ieee1905.al.%s"
,
ap
->
ifname
);
runCmd
(
"ubus list ieee1905.al.%s"
,
ap
->
ifname
);
fprintf
(
stderr
,
"mid = %s
\n
"
,
mid
);
fprintf
(
stderr
,
"mid = %s
\n
"
,
mid
);
errno
=
0
;
errno
=
0
;
ap
->
mid
[
ap
->
num_mid
]
=
(
uint16_t
)
strtol
(
mid
,
&
endptr
,
1
6
);
ap
->
mid
[
ap
->
num_mid
]
=
(
uint16_t
)
strto
u
l
(
mid
,
NULL
,
1
0
);
if
(
errno
||
*
endptr
!=
'\0'
)
{
if
(
errno
)
{
fprintf
(
stderr
,
"Invalid mid value: %s
\n
"
,
mid
);
fprintf
(
stderr
,
"Invalid mid value: %s
\n
"
,
mid
);
ap
->
mid
[
ap
->
num_mid
]
=
0
;
ap
->
mid
[
ap
->
num_mid
]
=
0
;
}
}
fprintf
(
stderr
,
"mid[%d] = %
d
\n
"
,
ap
->
num_mid
,
ap
->
mid
[
ap
->
num_mid
]);
fprintf
(
stderr
,
"mid[%d] = %
u
\n
"
,
ap
->
num_mid
,
ap
->
mid
[
ap
->
num_mid
]);
if
(
ap
->
num_mid
<
31
)
if
(
ap
->
num_mid
<
31
)
ap
->
num_mid
++
;
ap
->
num_mid
++
;
...
...
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