X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fyaz-my-server.cpp;h=bd9d7f6d5c2c57a304aeb1f447926901d262f675;hb=29d5f0cb70a5a61924e3b729f6ce5998cd6485ab;hp=7fae44dbc152e1d9972d720ffc716fe24a5e8e32;hpb=ff30371654768d249cd4c92a9af26ae6bff8c65b;p=yazpp-moved-to-github.git diff --git a/src/yaz-my-server.cpp b/src/yaz-my-server.cpp index 7fae44d..bd9d7f6 100644 --- a/src/yaz-my-server.cpp +++ b/src/yaz-my-server.cpp @@ -2,9 +2,10 @@ * Copyright (c) 1998-2001, Index Data. * See the file LICENSE for details. * - * $Id: yaz-my-server.cpp,v 1.11 2002-10-28 12:16:09 adam Exp $ + * $Id: yaz-my-server.cpp,v 1.15 2005-01-17 09:55:58 adam Exp $ */ +#include #include #include #include @@ -66,34 +67,34 @@ void MyILL::ill_service (Z_ExtendedServicesRequest *req, Z_ItemOrder *io, Z_ExtendedServicesResponse *res) { - yaz_log (LOG_LOG, "MyServer::ill_service"); + yaz_log (YLOG_LOG, "MyServer::ill_service"); } void MyUpdate::update_service (Z_ExtendedServicesRequest *req, Z_IUUpdate *io, Z_ExtendedServicesResponse *res) { - yaz_log (LOG_LOG, "MyServer::update_service (v1.1)"); + yaz_log (YLOG_LOG, "MyServer::update_service (v1.1)"); } void MyUpdate::update_service0 (Z_ExtendedServicesRequest *req, Z_IU0Update *io, Z_ExtendedServicesResponse *res) { - yaz_log (LOG_LOG, "MyServer::update_service (v1.0)"); + yaz_log (YLOG_LOG, "MyServer::update_service (v1.0)"); } int MyRetrieval::sr_init (Z_InitRequest *initRequest, Z_InitResponse *initResponse) { - yaz_log (LOG_LOG, "MyServer::sr_init"); + yaz_log (YLOG_LOG, "MyServer::sr_init"); return 1; } void MyRetrieval::sr_search (Z_SearchRequest *searchRequest, Z_SearchResponse *searchResponse) { - yaz_log (LOG_LOG, "MyServer::recv_Z_search"); + yaz_log (YLOG_LOG, "MyServer::recv_Z_search"); if (searchRequest->query->which == Z_Query_type_1) { Z_RPNStructure *s = searchRequest->query->u.type_1->RPNStructure; @@ -114,7 +115,7 @@ void MyRetrieval::sr_search (Z_SearchRequest *searchRequest, void MyRetrieval::sr_present (Z_PresentRequest *presentRequest, Z_PresentResponse *presentResponse) { - yaz_log (LOG_LOG, "MyServer::recv_Z_present"); + yaz_log (YLOG_LOG, "MyServer::recv_Z_present"); } void MyRetrieval::sr_record (const char *resultSetName, @@ -124,7 +125,7 @@ void MyRetrieval::sr_record (const char *resultSetName, Z_NamePlusRecord *namePlusRecord, Z_Records *records) { - yaz_log (LOG_LOG, "MyServer::recv_Z_record"); + yaz_log (YLOG_LOG, "MyServer::recv_Z_record"); const char *rec = get_record(position); create_databaseRecord (odr_encode(), namePlusRecord, 0, VAL_USMARC, rec, strlen(rec)); @@ -157,13 +158,13 @@ MyServer::MyServer(IYaz_PDU_Observable *the_PDU_Observable) : void MyServer::timeoutNotify() { - yaz_log (LOG_LOG, "connection timed out"); + yaz_log (YLOG_LOG, "connection timed out"); delete this; } void MyServer::failNotify() { - yaz_log (LOG_LOG, "connection closed by client"); + yaz_log (YLOG_LOG, "connection closed by client"); delete this; } @@ -171,7 +172,7 @@ void MyServer::connectNotify() { } -void usage(char *prog) +void usage(const char *prog) { fprintf (stderr, "%s: [-a log] [-v level] [-T] @:port\n", prog); exit (1); @@ -182,7 +183,7 @@ int main(int argc, char **argv) int thread_flag = 0; char *arg; char *prog = *argv; - char *addr = "tcp:@:9999"; + const char *addr = "tcp:@:9999"; char *apdu_log = 0; Yaz_SocketManager mySocketManager; @@ -226,7 +227,7 @@ int main(int argc, char **argv) z->server(addr); if (apdu_log) { - yaz_log (LOG_LOG, "set_APDU_log %s", apdu_log); + yaz_log (YLOG_LOG, "set_APDU_log %s", apdu_log); z->set_APDU_log(apdu_log); }