Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFS Gluon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
firmware
FFS Gluon
Commits
6d4d4792
Unverified
Commit
6d4d4792
authored
6 years ago
by
Matthias Schiffer
Browse files
Options
Downloads
Patches
Plain Diff
gluon-mesh-*: do not count wifi clients/neighbours inactive for more than 60s
parent
f61d2523
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
package/gluon-mesh-babel/src/respondd.c
+10
-1
10 additions, 1 deletion
package/gluon-mesh-babel/src/respondd.c
package/gluon-mesh-batman-adv/src/respondd.c
+8
-1
8 additions, 1 deletion
package/gluon-mesh-batman-adv/src/respondd.c
with
18 additions
and
2 deletions
package/gluon-mesh-babel/src/respondd.c
+
10
−
1
View file @
6d4d4792
...
...
@@ -63,6 +63,8 @@
#define STRINGIFY(s) _STRINGIFY(s)
#include
<stdlib.h>
#define MAX_INACTIVITY 60000
#define SOCKET_INPUT_BUFFER_SIZE 255
#define BABEL_PORT 33123
#define VPN_INTERFACE "mesh-vpn"
...
...
@@ -461,8 +463,12 @@ static void count_iface_stations(size_t *wifi24, size_t *wifi5, const char *ifna
return
;
struct
iwinfo_assoclist_entry
*
entry
;
for
(
entry
=
(
struct
iwinfo_assoclist_entry
*
)
buf
;
(
char
*
)(
entry
+
1
)
<=
buf
+
len
;
entry
++
)
for
(
entry
=
(
struct
iwinfo_assoclist_entry
*
)
buf
;
(
char
*
)(
entry
+
1
)
<=
buf
+
len
;
entry
++
)
{
if
(
entry
->
inactive
>
MAX_INACTIVITY
)
continue
;
(
*
wifi
)
++
;
}
}
static
void
count_stations
(
size_t
*
wifi24
,
size_t
*
wifi5
)
{
...
...
@@ -623,6 +629,9 @@ static struct json_object * get_wifi_neighbours(const char *ifname) {
struct
iwinfo_assoclist_entry
*
entry
;
for
(
entry
=
(
struct
iwinfo_assoclist_entry
*
)
buf
;
(
char
*
)(
entry
+
1
)
<=
buf
+
len
;
entry
++
)
{
if
(
entry
->
inactive
>
MAX_INACTIVITY
)
continue
;
struct
json_object
*
obj
=
json_object_new_object
();
json_object_object_add
(
obj
,
"signal"
,
json_object_new_int
(
entry
->
signal
));
...
...
This diff is collapsed.
Click to expand it.
package/gluon-mesh-batman-adv/src/respondd.c
+
8
−
1
View file @
6d4d4792
...
...
@@ -444,8 +444,12 @@ static void count_iface_stations(size_t *wifi24, size_t *wifi5, const char *ifna
return
;
struct
iwinfo_assoclist_entry
*
entry
;
for
(
entry
=
(
struct
iwinfo_assoclist_entry
*
)
buf
;
(
char
*
)(
entry
+
1
)
<=
buf
+
len
;
entry
++
)
for
(
entry
=
(
struct
iwinfo_assoclist_entry
*
)
buf
;
(
char
*
)(
entry
+
1
)
<=
buf
+
len
;
entry
++
)
{
if
(
entry
->
inactive
>
MAX_INACTIVITY
)
continue
;
(
*
wifi
)
++
;
}
}
static
void
count_stations
(
size_t
*
wifi24
,
size_t
*
wifi5
)
{
...
...
@@ -712,6 +716,9 @@ static struct json_object * get_wifi_neighbours(const char *ifname) {
struct
iwinfo_assoclist_entry
*
entry
;
for
(
entry
=
(
struct
iwinfo_assoclist_entry
*
)
buf
;
(
char
*
)(
entry
+
1
)
<=
buf
+
len
;
entry
++
)
{
if
(
entry
->
inactive
>
MAX_INACTIVITY
)
continue
;
struct
json_object
*
obj
=
json_object_new_object
();
json_object_object_add
(
obj
,
"signal"
,
json_object_new_int
(
entry
->
signal
));
...
...
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