/* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2011 Index Data
+ * Copyright (C) Index Data
* See the file LICENSE for details.
*/
#ifndef WIN32
{
unsigned long one = 1;
- if (setsockopt(p->m_socket, SOL_SOCKET, SO_REUSEADDR, (char*)
+ if (setsockopt(p->m_socket, SOL_SOCKET, SO_REUSEADDR, (char*)
&one, sizeof(one)))
{
if (err_msg)
add.sin_port = htons(port_to_use);
add.sin_addr.s_addr = INADDR_ANY;
addr = ( struct sockaddr *) &add;
-
+
if (bind(p->m_socket, addr, sizeof(struct sockaddr_in)))
{
if (err_msg)
yaz_spipe_destroy(p);
return 0;
}
-
+
if (listen(p->m_socket, 3) < 0)
{
if (err_msg)
yaz_spipe_destroy(p);
return 0;
}
-
+
memcpy(&add.sin_addr.s_addr, &tmpadd, sizeof(struct in_addr));
p->m_fd[1] = socket(AF_INET, SOCK_STREAM, 0);
if (p->m_fd[1] == YAZ_INVALID_SOCKET)