Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
ffbs-gluon
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
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
ffbs
ffbs-gluon
Commits
aa33a94e
Commit
aa33a94e
authored
9 years ago
by
Matthias Schiffer
Browse files
Options
Downloads
Plain Diff
Merge pull request #411 from FreifunkBremen/feature-neighbour-info-timeout
gluon-neighbour-info: Support sub-second timeout
parents
e8781556
9f91a5f8
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
package/gluon-neighbour-info/src/gluon-neighbour-info.c
+5
-5
5 additions, 5 deletions
package/gluon-neighbour-info/src/gluon-neighbour-info.c
with
5 additions
and
5 deletions
package/gluon-neighbour-info/src/gluon-neighbour-info.c
+
5
−
5
View file @
aa33a94e
...
...
@@ -78,7 +78,7 @@ ssize_t recvtimeout(int socket, void *buffer, size_t length, int flags, struct t
return
ret
;
}
int
request
(
const
int
sock
,
const
struct
sockaddr_in6
*
client_addr
,
const
char
*
request
,
bool
sse
,
int
timeout
)
{
int
request
(
const
int
sock
,
const
struct
sockaddr_in6
*
client_addr
,
const
char
*
request
,
bool
sse
,
double
timeout
)
{
ssize_t
ret
;
char
buffer
[
8192
];
...
...
@@ -90,8 +90,8 @@ int request(const int sock, const struct sockaddr_in6 *client_addr, const char *
}
struct
timeval
tv_timeout
,
tv_offset
;
tv_timeout
.
tv_sec
=
timeout
;
tv_timeout
.
tv_usec
=
0
;
tv_timeout
.
tv_sec
=
(
int
)
timeout
;
tv_timeout
.
tv_usec
=
((
int
)
(
timeout
*
1000000
))
%
100000
0
;
getclock
(
&
tv_offset
);
...
...
@@ -137,7 +137,7 @@ int main(int argc, char **argv) {
int
port_set
=
0
;
int
destination_set
=
0
;
int
timeout
=
3
;
double
timeout
=
3
.
0
;
bool
sse
=
false
;
int
c
;
...
...
@@ -163,7 +163,7 @@ int main(int argc, char **argv) {
request_string
=
optarg
;
break
;
case
't'
:
timeout
=
ato
i
(
optarg
);
timeout
=
ato
f
(
optarg
);
break
;
case
's'
:
sse
=
true
;
...
...
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