Commit 9c2c5a36 authored by unknown's avatar unknown

Merge hundin:/my/mysql-3.23 into tik.mysql.fi:/home/my/mysql-3.23

parents 7dbfbd2c 7c8525df
...@@ -917,21 +917,22 @@ static void server_init(void) ...@@ -917,21 +917,22 @@ static void server_init(void)
IPaddr.sin_addr.s_addr = my_bind_addr; IPaddr.sin_addr.s_addr = my_bind_addr;
IPaddr.sin_port = (unsigned short) htons((unsigned short) mysql_port); IPaddr.sin_port = (unsigned short) htons((unsigned short) mysql_port);
(void) setsockopt(ip_sock,SOL_SOCKET,SO_REUSEADDR,(char*)&arg,sizeof(arg)); (void) setsockopt(ip_sock,SOL_SOCKET,SO_REUSEADDR,(char*)&arg,sizeof(arg));
for(;;) if (bind(ip_sock, my_reinterpret_cast(struct sockaddr *) (&IPaddr),
sizeof(IPaddr)) < 0)
{ {
if (bind(ip_sock, my_reinterpret_cast(struct sockaddr *) (&IPaddr),
sizeof(IPaddr)) >= 0)
break;
DBUG_PRINT("error",("Got error: %d from bind",socket_errno)); DBUG_PRINT("error",("Got error: %d from bind",socket_errno));
sql_perror("Can't start server: Bind on TCP/IP port");/* Had a loop here */ sql_perror("Can't start server: Bind on TCP/IP port");
sql_print_error("Do you already have another mysqld server running on port: %d ?",mysql_port); sql_print_error("Do you already have another mysqld server running on port: %d ?",mysql_port);
unireg_abort(1); unireg_abort(1);
} }
if (listen(ip_sock,(int) back_log) < 0) if (listen(ip_sock,(int) back_log) < 0)
{
sql_perror("Can't start server: listen() on TCP/IP port");
sql_print_error("Warning: listen() on TCP/IP failed with error %d", sql_print_error("Warning: listen() on TCP/IP failed with error %d",
socket_errno); socket_errno);
unireg_abort(1);
}
} }
if (mysqld_chroot) if (mysqld_chroot)
set_root(mysqld_chroot); set_root(mysqld_chroot);
......
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