X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Fsessiond-comm%2Funix.c;h=0d7c95a7637638f066b28f0c2dbe14dc2bbd393d;hp=48fa1049ac99e6d597e8982bceb5e4cfcf9236fe;hb=783a3b9aa609d6805e1463655d25c7ae176c4859;hpb=a655f4cf59f557aef3f0a975988d87bdd3b199fd diff --git a/src/common/sessiond-comm/unix.c b/src/common/sessiond-comm/unix.c index 48fa1049a..0d7c95a76 100644 --- a/src/common/sessiond-comm/unix.c +++ b/src/common/sessiond-comm/unix.c @@ -539,45 +539,3 @@ int lttcomm_setsockopt_creds_unix_sock(int sock) #else #error "Please implement credential support for your OS." #endif /* __linux__ */ - -/* - * Set socket reciving timeout. - */ -LTTNG_HIDDEN -int lttcomm_setsockopt_rcv_timeout(int sock, unsigned int sec) -{ - int ret; - struct timeval tv; - - tv.tv_sec = sec; - tv.tv_usec = 0; - - ret = setsockopt(sock, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv)); - if (ret < 0) { - PERROR("setsockopt SO_RCVTIMEO"); - ret = -errno; - } - - return ret; -} - -/* - * Set socket sending timeout. - */ -LTTNG_HIDDEN -int lttcomm_setsockopt_snd_timeout(int sock, unsigned int sec) -{ - int ret; - struct timeval tv; - - tv.tv_sec = sec; - tv.tv_usec = 0; - - ret = setsockopt(sock, SOL_SOCKET, SO_SNDTIMEO, &tv, sizeof(tv)); - if (ret < 0) { - PERROR("setsockopt SO_SNDTIMEO"); - ret = -errno; - } - - return ret; -}