X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fzoom-c.c;h=c73027486aece3b3d3fa73e945ef879ed1d6c8bc;hb=dda6b9f4ca21d43c68d4c667b4d8e6d1bdaba095;hp=57c083cf2423fe6aacdefedbbc022fc5f5770075;hpb=5a1156a0d8d50aa07af3eec75e939ed2065d3880;p=yaz-moved-to-github.git diff --git a/src/zoom-c.c b/src/zoom-c.c index 57c083c..c730274 100644 --- a/src/zoom-c.c +++ b/src/zoom-c.c @@ -930,6 +930,7 @@ ZOOM_API(ZOOM_resultset) task->u.search.resultset = r; task->u.search.start = start; task->u.search.count = count; + task->u.search.recv_search_fired = 0; syntax = ZOOM_options_get(r->options, "preferredRecordSyntax"); task->u.search.syntax = syntax ? xstrdup(syntax) : 0; @@ -1374,11 +1375,10 @@ static zoom_ret ZOOM_connection_send_init(ZOOM_connection c) ODR_MASK_SET(ireq->protocolVersion, Z_ProtocolVersion_2); ODR_MASK_SET(ireq->protocolVersion, Z_ProtocolVersion_3); - /* Index Data's Z39.50 Implementor Id is 81 */ ireq->implementationId = odr_prepend(c->odr_out, ZOOM_options_get(c->options, "implementationId"), - odr_prepend(c->odr_out, "81", ireq->implementationId)); + ireq->implementationId); ireq->implementationName = odr_prepend(c->odr_out, @@ -1386,14 +1386,10 @@ static zoom_ret ZOOM_connection_send_init(ZOOM_connection c) odr_prepend(c->odr_out, "ZOOM-C", ireq->implementationName)); - version = odr_strdup(c->odr_out, "$Revision: 1.154 $"); - if (strlen(version) > 10) /* check for unexpanded CVS strings */ - version[strlen(version)-2] = '\0'; ireq->implementationVersion = odr_prepend(c->odr_out, ZOOM_options_get(c->options, "implementationVersion"), - odr_prepend(c->odr_out, &version[11], - ireq->implementationVersion)); + ireq->implementationVersion); *ireq->maximumRecordSize = c->maximum_record_size; *ireq->preferredMessageSize = c->preferred_message_size; @@ -3995,9 +3991,12 @@ static zoom_ret handle_srw_response(ZOOM_connection c, syntax = c->tasks->u.search.syntax; elementSetName = c->tasks->u.search.elementSetName; - event = ZOOM_Event_create(ZOOM_EVENT_RECV_SEARCH); - ZOOM_connection_put_event(c, event); - + if (!c->tasks->u.search.recv_search_fired) + { + event = ZOOM_Event_create(ZOOM_EVENT_RECV_SEARCH); + ZOOM_connection_put_event(c, event); + c->tasks->u.search.recv_search_fired = 1; + } break; case ZOOM_TASK_RETRIEVE: resultset = c->tasks->u.retrieve.resultset;