X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=zutil%2Fzoom-c.c;h=72e73544c23de7217c0655cf5fed7da960f16277;hb=e12377e7ea8e58cf447492b5cb9887b839a78700;hp=8281575fb7f3c2fb39643db3ff2dc5bb03f08940;hpb=c76d8db946107b4eab4849ca1166caf8bf1c7b5d;p=yaz-moved-to-github.git diff --git a/zutil/zoom-c.c b/zutil/zoom-c.c index 8281575..72e7354 100644 --- a/zutil/zoom-c.c +++ b/zutil/zoom-c.c @@ -2,7 +2,7 @@ * Copyright (c) 2000-2003, Index Data * See the file LICENSE for details. * - * $Id: zoom-c.c,v 1.23 2003-02-18 09:12:14 adam Exp $ + * $Id: zoom-c.c,v 1.25 2003-02-19 15:22:11 adam Exp $ * * ZOOM layer for C, connections, result sets, queries. */ @@ -100,7 +100,7 @@ static void set_dset_error (ZOOM_connection c, int error, else if (addinfo) c->addinfo = xstrdup(addinfo); if (error) - yaz_log(LOG_LOG, "Error %s %s:%d %s %s", + yaz_log(LOG_DEBUG, "Error %s %s:%d %s %s", c->host_port ? c->host_port : "<>", dset, error, addinfo ? addinfo : "", addinfo2 ? addinfo2 : ""); @@ -1063,9 +1063,10 @@ static zoom_ret ZOOM_connection_srw_send_search(ZOOM_connection c) if (resultset->z_query->which == Z_Query_type_104 && resultset->z_query->u.type_104->which == Z_External_CQL) sr->u.request->query = resultset->z_query->u.type_104->u.cql; - else if (resultset->z_query->which == Z_Query_type_1) - { - set_ZOOM_error(c, ZOOM_ERROR_UNSUPPORTED_QUERY, "Type-1"); + else if (resultset->z_query->which == Z_Query_type_1 && + resultset->z_query->u.type_1) + { + set_ZOOM_error(c, ZOOM_ERROR_UNSUPPORTED_QUERY, 0); return zoom_complete; } else @@ -2411,7 +2412,7 @@ static void handle_srw_response(ZOOM_connection c, resultset->size = 0; - yaz_log(LOG_LOG, "got SRW response OK"); + yaz_log(LOG_DEBUG, "got SRW response OK"); if (res->numberOfRecords) resultset->size = *res->numberOfRecords; @@ -2445,7 +2446,6 @@ static void handle_srw_response(ZOOM_connection c, npr->u.databaseRecord->u.octet_aligned->size = res->records[i].recordData_len; record_cache_add (resultset, npr, pos); - yaz_log(LOG_LOG, "add SRW record to cache to pos %d", pos); } if (res->num_diagnostics > 0) { @@ -2729,7 +2729,7 @@ ZOOM_connection_error_x (ZOOM_connection c, const char **cp, else if (!strcmp(c->diagset, "Bib-1")) *cp = ZOOM_diag_str(error); else if (!strcmp(c->diagset, "SRW")) - *cp = yaz_srw_error_str(c->error); + *cp = yaz_diag_srw_str(c->error); else *cp = "Unknown error and diagnostic set"; }