Univention Bugzilla – Attachment 7181 Details for
Bug 34763
Keep alive for LDAP/notifier connections
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
qa.patch
qa.patch (text/plain), 3.47 KB, created by
Arvid Requate
on 2015-09-23 13:17 CEST
(
hide
)
Description:
qa.patch
Filename:
MIME Type:
Creator:
Arvid Requate
Created:
2015-09-23 13:17 CEST
Size:
3.47 KB
patch
obsolete
>Index: debian/control >=================================================================== >--- debian/control (Revision 63675) >+++ debian/control (Arbeitskopie) >@@ -1,6 +1,6 @@ > Source: univention-directory-listener > Section: univention >-Priority: optional >+Priority: standard > Maintainer: Univention GmbH <packages@univention.de> > Standards-Version: 3.5.5 > Build-Depends: debhelper (>= 9), >Index: src/main.c >=================================================================== >--- src/main.c (Revision 63675) >+++ src/main.c (Arbeitskopie) >@@ -384,24 +384,29 @@ > }; > int ret; > ret = ldap_set_option(NULL, LDAP_OPT_NETWORK_TIMEOUT, &timeout); >- if (ret != LDAP_OPT_SUCCESS) >+ if (ret != LDAP_OPT_SUCCESS) { > fprintf(stderr, "Failed to set LDAP connection timeout: %s\n", ldap_err2string(ret)); >+ } > ret = ldap_set_option(NULL, LDAP_OPT_TIMEOUT, &timeout); >- if (ret != LDAP_OPT_SUCCESS) >+ if (ret != LDAP_OPT_SUCCESS) { > fprintf(stderr, "Failed to set LDAP synchronous API timeout: %s\n", ldap_err2string(ret)); >+ } > > const int idle = 60; > ret = ldap_set_option(NULL, LDAP_OPT_X_KEEPALIVE_IDLE, &idle); >- if (ret != LDAP_OPT_SUCCESS) >+ if (ret != LDAP_OPT_SUCCESS) { > fprintf(stderr, "Failed to set TCP KA idle: %s\n", ldap_err2string(ret)); >+ } > const int probes = 12; > ret = ldap_set_option(NULL, LDAP_OPT_X_KEEPALIVE_PROBES, &probes); >- if (ret != LDAP_OPT_SUCCESS) >+ if (ret != LDAP_OPT_SUCCESS) { > fprintf(stderr, "Failed to set TCP KA probes: %s\n", ldap_err2string(ret)); >+ } > const int interval = 5; >- ret = ldap_set_option(NULL, LDAP_OPT_X_KEEPALIVE_PROBES, &interval); >- if (ret != LDAP_OPT_SUCCESS) >+ ret = ldap_set_option(NULL, LDAP_OPT_X_KEEPALIVE_INTERVAL, &interval); >+ if (ret != LDAP_OPT_SUCCESS) { > fprintf(stderr, "Failed to set TCP KA interval: %s\n", ldap_err2string(ret)); >+ } > } > > if ((lp = univention_ldap_new()) == NULL) >Index: src/network.c >=================================================================== >--- src/network.c (Revision 63675) >+++ src/network.c (Arbeitskopie) >@@ -414,28 +414,34 @@ > }; > int ret; > ret = setsockopt(client->fd, SOL_SOCKET, SO_RCVTIMEO, &timeout, sizeof(timeout)); >- if (ret < 0) >+ if (ret < 0) { > univention_debug(UV_DEBUG_LISTENER, UV_DEBUG_WARN, "Failed to set SO_RCVTIMEO\n"); >+ } > ret = setsockopt(client->fd, SOL_SOCKET, SO_SNDTIMEO, &timeout, sizeof(timeout)); >- if (ret < 0) >+ if (ret < 0) { > univention_debug(UV_DEBUG_LISTENER, UV_DEBUG_WARN, "Failed to set SO_SNDTIMEO\n"); >+ } > > const int enable = 1; > ret = setsockopt(client->fd, SOL_SOCKET, SO_KEEPALIVE, &enable, sizeof(enable)); >- if (ret < 0) >+ if (ret < 0) { > univention_debug(UV_DEBUG_LISTENER, UV_DEBUG_WARN, "Failed to enable TCP KEEPALIVE\n"); >+ } > const int idle = 60; > ret = setsockopt(client->fd, SOL_TCP, TCP_KEEPIDLE, &idle, sizeof(idle)); >- if (ret < 0) >+ if (ret < 0) { > univention_debug(UV_DEBUG_LISTENER, UV_DEBUG_WARN, "Failed to set TCP_KEEPIDLE\n"); >+ } > const int probes = 12; > ret = setsockopt(client->fd, SOL_TCP, TCP_KEEPCNT, &probes, sizeof(probes)); >- if (ret < 0) >+ if (ret < 0) { > univention_debug(UV_DEBUG_LISTENER, UV_DEBUG_WARN, "Failed to set TCP_KEEPCNT\n"); >+ } > const int interval = 5; > ret = setsockopt(client->fd, SOL_TCP, TCP_KEEPINTVL, &interval, sizeof(interval)); >- if (ret < 0) >+ if (ret < 0) { > univention_debug(UV_DEBUG_LISTENER, UV_DEBUG_WARN, "Failed to set TCP_KEEPINTVL\n"); >+ } > } > > if (connect(client->fd, address, addrlen) == -1) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 34763
: 7181