X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=server%2Fseshigh.c;h=277050ab5825a62193748b153aecf4643fc31fe3;hb=eaf27c9dc97e048dcd9a90dc05aa8133b3020c5b;hp=755b3e92cb32e416aecdbd94eba39a5c54ff4f30;hpb=4f7e8b411cb0c30c02b3eaf23fdfef5275dae098;p=yaz-moved-to-github.git diff --git a/server/seshigh.c b/server/seshigh.c index 755b3e9..277050a 100644 --- a/server/seshigh.c +++ b/server/seshigh.c @@ -3,7 +3,20 @@ * See the file LICENSE for details. * * $Log: seshigh.c,v $ - * Revision 1.106 2000-08-31 09:51:25 adam + * Revision 1.110 2000-10-02 13:05:32 adam + * Fixed bug introduced by previous commit. + * + * Revision 1.109 2000/10/02 11:07:44 adam + * Added peer_name member for bend_init handler. Changed the YAZ + * client so that tcp: can be avoided in target spec. + * + * Revision 1.108 2000/09/04 08:58:15 adam + * Added prefix yaz_ for most logging utility functions. + * + * Revision 1.107 2000/08/31 10:20:12 adam + * Added member request_format and output_format for backend fetch method. + * + * Revision 1.106 2000/08/31 09:51:25 adam * Added record_syntax member for fetch method (raw OID). * * Revision 1.105 2000/07/06 10:38:47 adam @@ -605,7 +618,7 @@ void ir_session(IOCHAN h, int event) odr_errmsg(odr_geterror(assoc->decode)), odr_offset(assoc->decode)); yaz_log(LOG_LOG, "PDU dump:"); - odr_dumpBER(log_file(), assoc->input_buffer, res); + odr_dumpBER(yaz_log_file(), assoc->input_buffer, res); do_close(assoc, Z_Close_protocolError, "Malformed package"); return; } @@ -887,6 +900,9 @@ static Z_APDU *process_initRequest(association *assoc, request *reqb) assoc->init->bend_scan = NULL; assoc->init->bend_segment = NULL; assoc->init->bend_fetch = NULL; + + assoc->init->peer_name = + odr_strdup (assoc->encode, cs_addrstr(assoc->client_link)); if (!(binitres = (*cb->bend_init)(assoc->init))) { yaz_log(LOG_WARN, "Bad response from backend."); @@ -1187,8 +1203,9 @@ static Z_Records *pack_records(association *a, char *setname, int start, freq.number = recno; freq.comp = comp; freq.request_format = format; - freq.record_syntax = oid; - freq.output_format = 0; + freq.request_format_raw = oid; + freq.output_format = format; + freq.output_format_raw = 0; freq.stream = a->encode; freq.print = a->print; freq.surrogate_flag = 0; @@ -1260,6 +1277,12 @@ static Z_Records *pack_records(association *a, char *setname, int start, return 0; strcpy(thisrec->databaseName, freq.basename); thisrec->which = Z_NamePlusRecord_databaseRecord; + + if (freq.output_format_raw) + { + struct oident *ident = oid_getentbyoid(freq.output_format_raw); + freq.output_format = ident->value; + } thisrec->u.databaseRecord = z_ext_record(a->encode, freq.output_format, freq.record, freq.len); if (!thisrec->u.databaseRecord) @@ -1494,7 +1517,6 @@ static Z_APDU *process_presentRequest(association *assoc, request *reqb, bprr->start = *req->resultSetStartPoint; bprr->number = *req->numberOfRecordsRequested; bprr->format = form; - bprr->record_syntax = req->preferredRecordSyntax; bprr->comp = req->recordComposition; bprr->referenceId = req->referenceId; bprr->stream = assoc->encode;