set smtp connect to TOS=lowdelay
This commit is contained in:
parent
ec836e7873
commit
55d6e766a4
@ -231,6 +231,13 @@ int smtp_connect(smtp_t *handle) {
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
optval = 0x10; /* TOS=lowdelay*/
|
||||||
|
err = setsockopt(handle->socket, IPPROTO_IP, IP_TOS, (void*)&optval, sizeof(optval));
|
||||||
|
if (-1 == err) {
|
||||||
|
syslog(LOG_DEBUG, "smtp_connect: unable to set IPTOS_LOWDELAY: %d (%s)", errno, strerror(errno));
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
c = fcntl(handle->socket, F_GETFL);
|
c = fcntl(handle->socket, F_GETFL);
|
||||||
if (-1 == c) {
|
if (-1 == c) {
|
||||||
syslog(LOG_DEBUG, "smtp_connect: unable to get flags, errno: %d (%s)", errno, strerror(errno));
|
syslog(LOG_DEBUG, "smtp_connect: unable to get flags, errno: %d (%s)", errno, strerror(errno));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user