From 774b404644e34b4f48f68937b22764847a77860f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ji=C5=99=C3=AD=20=C5=A0kr=C3=A1bal?= Date: Thu, 17 Feb 2005 08:07:34 +0000 Subject: [PATCH] - Check for gsoap version --- org.glite.security.gsoap-plugin/Makefile | 5 +++++ org.glite.security.gsoap-plugin/src/glite_gsplugin.c | 11 +++++++++++ 2 files changed, 16 insertions(+) diff --git a/org.glite.security.gsoap-plugin/Makefile b/org.glite.security.gsoap-plugin/Makefile index a1c4623..07b464b 100644 --- a/org.glite.security.gsoap-plugin/Makefile +++ b/org.glite.security.gsoap-plugin/Makefile @@ -22,6 +22,9 @@ GSPLUGIN_DEBUG:= version_info=-version-info `echo ${version} | cut -d. -f1,2 | tr . :` +gsoap_version=`${gsoap_prefix}/bin/soapcpp2 -version 2>&1 | cut -d' ' -f4 | perl -F\\\\. -nae '$$F[2] =~ s/\D*$$//; print $$F[2]+100*$$F[1]+10000*$$F[0]'` +gsoap_min_version=`${gsoap_prefix}/bin/soapcpp2 -version 2>&1 | cut -d' ' -f4 | cut -d'.' -f3` + VPATH=${top_srcdir}/src:${top_srcdir}/test:${top_srcdir}/examples TEST_LIBS:=-L${cppunit}/lib -lcppunit @@ -35,6 +38,8 @@ endif CFLAGS:= ${DEBUG} \ -DVERSION=\"${version}\" \ + -DGSOAP_VERSION=${gsoap_version} \ + -DGSOAP_MIN_VERSION=\"${gsoap_min_version}\" \ -I${top_srcdir}/src -I${top_srcdir}/interface -I. \ -I${stagedir}/include \ -I${gsoap_prefix}/include \ diff --git a/org.glite.security.gsoap-plugin/src/glite_gsplugin.c b/org.glite.security.gsoap-plugin/src/glite_gsplugin.c index 8cfb12f..bdec0aa 100644 --- a/org.glite.security.gsoap-plugin/src/glite_gsplugin.c +++ b/org.glite.security.gsoap-plugin/src/glite_gsplugin.c @@ -108,7 +108,9 @@ glite_gsplugin(struct soap *soap, struct soap_plugin *p, void *arg) soap->fconnect = glite_gsplugin_connect; soap->fclose = glite_gsplugin_close; +#if GSOAP_VERSION >= 20700 soap->fclosesocket = glite_gsplugin_close; +#endif soap->faccept = glite_gsplugin_accept; soap->fsend = glite_gsplugin_send; soap->frecv = glite_gsplugin_recv; @@ -169,6 +171,15 @@ glite_gsplugin_connect( pdprintf(("GSLITE_GSPLUGIN: glite_gsplugin_connect()\n")); +#if GSOAP_VERSION <= 20700 + if ( GSOAP_VERSION < 20700 + || (GSOAP_VERSION == 20700 + && (strlen(GSOAP_MIN_VERSION) < 1 || GSOAP_MIN_VERSION[1] < 'e')) ) { + fprintf(stderr, "Client connect will work only with gSOAP v2.7.0e and later"); + return ENOSYS; + } +#endif + ctx = ((int_plugin_data_t *)soap_lookup_plugin(soap, plugin_id))->ctx; if ( ctx->cred == GSS_C_NO_CREDENTIAL ) { -- 1.8.2.3