projects
/
pazpar2-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed check for application/x-www-form-urlencoded parameters.
[pazpar2-moved-to-github.git]
/
src
/
connection.c
diff --git
a/src/connection.c
b/src/connection.c
index
067c7ac
..
c330155
100644
(file)
--- a/
src/connection.c
+++ b/
src/connection.c
@@
-21,21
+21,34
@@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\brief Z39.50 connection (low-level client)
*/
\brief Z39.50 connection (low-level client)
*/
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
+#if HAVE_SYS_TIME_H
#include <sys/time.h>
#include <sys/time.h>
+#endif
+#if HAVE_UNISTD_H
#include <unistd.h>
#include <unistd.h>
+#endif
+#if HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#include <sys/socket.h>
+#endif
+#ifdef WIN32
+#include <winsock.h>
+typedef int socklen_t;
+#endif
+#if HAVE_NETDB_H
#include <netdb.h>
#include <netdb.h>
+#endif
+
#include <signal.h>
#include <ctype.h>
#include <assert.h>
#include <signal.h>
#include <ctype.h>
#include <assert.h>
-#if HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#include <yaz/log.h>
#include <yaz/comstack.h>
#include <yaz/tcpip.h>
#include <yaz/log.h>
#include <yaz/comstack.h>
#include <yaz/tcpip.h>
@@
-170,7
+183,7
@@
static void connection_handler(IOCHAN i, int event)
int errcode;
socklen_t errlen = sizeof(errcode);
int errcode;
socklen_t errlen = sizeof(errcode);
- if (getsockopt(cs_fileno(co->link), SOL_SOCKET, SO_ERROR, &errcode,
+ if (getsockopt(cs_fileno(co->link), SOL_SOCKET, SO_ERROR, (char*) &errcode,
&errlen) < 0 || errcode != 0)
{
client_fatal(cl);
&errlen) < 0 || errcode != 0)
{
client_fatal(cl);