-/* $Id: srw-gateway.c,v 1.1 2003-01-06 08:20:28 adam Exp $
+/* $Id: srw-gateway.c,v 1.2 2003-01-20 13:04:50 adam Exp $
Copyright (C) 2002-2003
Index Data Aps
myunlock(&target_mutex);
}
+#if USE_THREADS
+static void *p_serve (void *p)
+{
+ struct soap *soap = p;
+ yaz_srw_serve(soap, searchRetrieve, explain);
+}
+#endif
+
+
static void standalone(struct soap *soap, const char *host, int port,
int max_thr, struct srw_prop *properties)
{
soap_thr[i]->user = properties;
#if USE_THREADS
if (max_thr <= 1)
- yaz_srw_serve(soap_thr[i], properties,
+ yaz_srw_serve(soap_thr[i],
searchRetrieve, explain); /* static mode .. */
else
- pthread_create(&tid[i], 0, (void*(*)(void*))soap_serve,
- soap_thr[i]);
+ pthread_create(&tid[i], 0, p_serve, soap_thr[i]);
#else
- yaz_srw_serve(soap_thr[i], properties,
+ yaz_srw_serve(soap_thr[i],
searchRetrieve, explain); /* static mode .. */
#endif
}
{
return 65;
}
- if (!strcmp(schema, "MARC21"))
+ if (!strcmp(schema, "MARC21") || !strcmp(schema, "http://www.loc.gov/marcxml/"))
{
*rec_data = soap_malloc (soap, xml_len+1);
memcpy (*rec_data, xml_rec, xml_len);
yaz_log_init_file(arg);
break;
case 'V':
- puts ("Version: $Id: srw-gateway.c,v 1.1 2003-01-06 08:20:28 adam Exp $"
+ puts ("Version: $Id: srw-gateway.c,v 1.2 2003-01-20 13:04:50 adam Exp $"
#if SRW_DEBUG
" DEBUG"
#endif
soap_init(&soap);
soap.user = &properties;
- yaz_srw_serve(&soap, &properties, searchRetrieve, explain);
+ yaz_srw_serve(&soap, searchRetrieve, explain);
soap_end(&soap);
yaz_log (LOG_LOG, "CGI end");