Fix compile problem in srw (when srw is disabled)
[yaz-moved-to-github.git] / server / seshigh.c
index a9e17fa..59361f5 100644 (file)
@@ -1,8 +1,8 @@
 /*
- * Copyright (c) 1995-2002, Index Data
+ * Copyright (c) 1995-2003, Index Data
  * See the file LICENSE for details.
  *
- * $Id: seshigh.c,v 1.131 2002-07-25 12:52:54 adam Exp $
+ * $Id: seshigh.c,v 1.133 2003-01-06 08:20:28 adam Exp $
  */
 
 /*
@@ -107,7 +107,11 @@ association *create_association(IOCHAN channel, COMSTACK link)
        strcpy(filename, control_block->apdufile);
        if (!(anew->print = odr_createmem(ODR_PRINT)))
            return 0;
-       if (*control_block->apdufile != '-')
+       if (*control_block->apdufile == '@')
+        {
+           odr_setprint(anew->print, yaz_log_file());
+       }       
+       else if (*control_block->apdufile != '-')
        {
            strcpy(filename, control_block->apdufile);
            if (!control_block->dynamic)
@@ -1043,11 +1047,8 @@ static Z_APDU *process_searchRequest(association *assoc, request *reqb,
        for (i = 0; i < req->num_databaseNames; i++)
            yaz_log (LOG_LOG, "Database '%s'", req->databaseNames[i]);
     }
-    switch (req->query->which)
-    {
-    case Z_Query_type_1: case Z_Query_type_101:
-       log_rpn_query (req->query->u.type_1);
-    }
+    yaz_log_zquery(req->query);
+
     if (assoc->init->bend_search)
     {
        bsrr->setname = req->resultSetName;
@@ -1589,7 +1590,7 @@ int bend_backend_respond (bend_association a, bend_request req)
     int r;
     r = process_request (a, req, &msg);
     if (r < 0)
-       logf (LOG_WARN, "%s", msg);
+       yaz_log (LOG_WARN, "%s", msg);
     return r;
 }