set smtp connect to TOS=lowdelay

This commit is contained in:
whottgen 2004-11-25 19:58:05 +00:00
parent ec836e7873
commit 55d6e766a4

View File

@ -231,6 +231,13 @@ int smtp_connect(smtp_t *handle) {
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);
if (-1 == c) {
syslog(LOG_DEBUG, "smtp_connect: unable to get flags, errno: %d (%s)", errno, strerror(errno));