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
f83fe37c
Commit
f83fe37c
authored
2 years ago
by
Martin Weinelt
Committed by
David Bauer
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
gluon-mesh-vpn-fastd: Expose negotiated method
(cherry picked from commit
0e102e79
)
parent
694e7f6d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
package/gluon-mesh-vpn-fastd/src/respondd.c
+5
-1
5 additions, 1 deletion
package/gluon-mesh-vpn-fastd/src/respondd.c
with
5 additions
and
1 deletion
package/gluon-mesh-vpn-fastd/src/respondd.c
+
5
−
1
View file @
f83fe37c
...
@@ -217,7 +217,7 @@ static bool get_peer_connection(struct json_object **ret, struct json_object *co
...
@@ -217,7 +217,7 @@ static bool get_peer_connection(struct json_object **ret, struct json_object *co
if
(
!
key
)
if
(
!
key
)
return
false
;
return
false
;
struct
json_object
*
peer
,
*
connection
,
*
established
;
struct
json_object
*
peer
,
*
connection
,
*
established
,
*
method
;
if
(
!
json_object_object_get_ex
(
peers
,
key
,
&
peer
)
||
if
(
!
json_object_object_get_ex
(
peers
,
key
,
&
peer
)
||
!
json_object_object_get_ex
(
peer
,
"connection"
,
&
connection
))
!
json_object_object_get_ex
(
peer
,
"connection"
,
&
connection
))
return
false
;
return
false
;
...
@@ -229,6 +229,10 @@ static bool get_peer_connection(struct json_object **ret, struct json_object *co
...
@@ -229,6 +229,10 @@ static bool get_peer_connection(struct json_object **ret, struct json_object *co
struct
json_object
*
jso
=
json_object_new_double
(
established_time
/
1000
.
0
);
struct
json_object
*
jso
=
json_object_new_double
(
established_time
/
1000
.
0
);
json_object_set_serializer
(
jso
,
json_object_double_to_json_string
,
"%.3f"
,
NULL
);
json_object_set_serializer
(
jso
,
json_object_double_to_json_string
,
"%.3f"
,
NULL
);
json_object_object_add
(
*
ret
,
"established"
,
jso
);
json_object_object_add
(
*
ret
,
"established"
,
jso
);
if
(
json_object_object_get_ex
(
connection
,
"method"
,
&
method
))
{
json_object_object_add
(
*
ret
,
"method"
,
json_object_get
(
method
));
}
}
}
else
{
else
{
*
ret
=
NULL
;
*
ret
=
NULL
;
...
...
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