Commit 4bb1c716 authored by unknown's avatar unknown

Merge bk-internal:/home/bk/mysql-4.1

into mysql.com:/home/jimw/my/mysql-4.1-clean

parents 844fe1ea dc43c6ea
...@@ -142,23 +142,29 @@ int vio_fastsend(Vio * vio __attribute__((unused))) ...@@ -142,23 +142,29 @@ int vio_fastsend(Vio * vio __attribute__((unused)))
int r=0; int r=0;
DBUG_ENTER("vio_fastsend"); DBUG_ENTER("vio_fastsend");
#ifdef IPTOS_THROUGHPUT #if defined(IPTOS_THROUGHPUT) && !defined(__EMX__)
{ {
#ifndef __EMX__
int tos = IPTOS_THROUGHPUT; int tos = IPTOS_THROUGHPUT;
if (!setsockopt(vio->sd, IPPROTO_IP, IP_TOS, (void *) &tos, sizeof(tos))) r= setsockopt(vio->sd, IPPROTO_IP, IP_TOS, (void *) &tos, sizeof(tos));
#endif /* !__EMX__ */ }
{ #endif /* IPTOS_THROUGHPUT && !__EMX__ */
int nodelay = 1; if (!r)
if (setsockopt(vio->sd, IPPROTO_TCP, TCP_NODELAY, (void *) &nodelay, {
sizeof(nodelay))) { #ifdef __WIN__
DBUG_PRINT("warning", BOOL nodelay= 1;
("Couldn't set socket option for fast send")); r= setsockopt(vio->sd, IPPROTO_TCP, TCP_NODELAY, (const char*) &nodelay,
r= -1; sizeof(nodelay));
} #else
} int nodelay = 1;
r= setsockopt(vio->sd, IPPROTO_TCP, TCP_NODELAY, (void*) &nodelay,
sizeof(nodelay));
#endif /* __WIN__ */
}
if (r)
{
DBUG_PRINT("warning", ("Couldn't set socket option for fast send"));
r= -1;
} }
#endif /* IPTOS_THROUGHPUT */
DBUG_PRINT("exit", ("%d", r)); DBUG_PRINT("exit", ("%d", r));
DBUG_RETURN(r); DBUG_RETURN(r);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment