X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Ftcpip.c;h=add2d32274e4ab668cea2bd2bd4dba880a8739d5;hp=bab44df61fab203c0656340f1aa64400594b4163;hb=a679666e56f9f6ea19e4c22e36089ccb3716dd0f;hpb=5ad7d533eb01f5f25f7c59f16a2d3c04a99ee041 diff --git a/src/tcpip.c b/src/tcpip.c index bab44df..add2d32 100644 --- a/src/tcpip.c +++ b/src/tcpip.c @@ -25,7 +25,6 @@ #endif #ifdef WIN32 - /* VS 2003 or later has getaddrinfo; older versions do not */ #include #if _MSC_VER >= 1300 @@ -34,14 +33,20 @@ #else #define HAVE_GETADDRINFO 0 #endif +#endif -#else +#if HAVE_NETINET_IN_H #include +#endif +#if HAVE_NETDB_H #include +#endif +#if HAVE_ARPA_INET_H #include +#endif +#if HAVE_NETINET_TCP_H #include #endif - #if HAVE_SYS_SOCKET_H #include #endif @@ -260,7 +265,7 @@ COMSTACK yaz_tcpip_create(int s, int flags, int protocol, static void tcpip_create_cred(COMSTACK cs) { tcpip_state *sp = (tcpip_state *) cs->cprivate; - sp->cred_ptr = xmalloc(sizeof(*sp->cred_ptr)); + sp->cred_ptr = (struct tcpip_cred_ptr *) xmalloc(sizeof(*sp->cred_ptr)); sp->cred_ptr->ref = 1; gnutls_certificate_allocate_credentials(&sp->cred_ptr->xcred); } @@ -599,7 +604,7 @@ int tcpip_rcvconnect(COMSTACK h) tcpip_create_cred(h); gnutls_init(&sp->session, GNUTLS_CLIENT); - gnutls_priority_set_direct(sp->session, "PERFORMANCE", NULL); + gnutls_set_default_priority(sp->session); gnutls_credentials_set (sp->session, GNUTLS_CRD_CERTIFICATE, sp->cred_ptr->xcred); @@ -938,8 +943,7 @@ COMSTACK tcpip_accept(COMSTACK h) xfree(state); return 0; } - res = gnutls_priority_set_direct(state->session, - "PERFORMANCE", NULL); + res = gnutls_set_default_priority(state->session); if (res != GNUTLS_E_SUCCESS) { xfree(cnew);