Skip to content

Commit

Permalink
fix [-Wunused-variable] for keep* variables
Browse files Browse the repository at this point in the history
  • Loading branch information
klemensn committed Jan 30, 2024
1 parent 7fcfe07 commit 62abb04
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions rtsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -5601,7 +5601,7 @@ void *rtsp_listen_loop(__attribute((unused)) void *arg) {
} else {
size_of_reply = sizeof(SOCKADDR);
if (getsockname(conn->fd, (struct sockaddr *)&conn->local, &size_of_reply) == 0) {

#ifndef COMPILE_FOR_OPENBSD
// Thanks to https://holmeshe.me/network-essentials-setsockopt-SO_KEEPALIVE/ for this.

// turn on keepalive stuff -- wait for keepidle + (keepcnt * keepinttvl time) seconds
Expand All @@ -5623,7 +5623,6 @@ void *rtsp_listen_loop(__attribute((unused)) void *arg) {
#define KEEP_ALIVE_OR_IDLE_OPTION TCP_KEEPIDLE
#endif

#ifndef COMPILE_FOR_OPENBSD
if (setsockopt(conn->fd, SOL_OPTION, KEEP_ALIVE_OR_IDLE_OPTION,
(void *)&keepAliveIdleTime, sizeof(keepAliveIdleTime))) {
debug(1, "can't set the keepidle wait time");
Expand Down

0 comments on commit 62abb04

Please sign in to comment.