From: Adam Dickmeiss Date: Tue, 1 Oct 2013 12:49:56 +0000 (+0200) Subject: Remove (last) bits of WAIS support X-Git-Tag: v5.0.0~6 X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=commitdiff_plain;h=e14b57aabd2bcdd5996d17778bf9055935d7b252 Remove (last) bits of WAIS support --- diff --git a/include/yaz/comstack.h b/include/yaz/comstack.h index 9c74e71..36c42e7 100644 --- a/include/yaz/comstack.h +++ b/include/yaz/comstack.h @@ -134,8 +134,6 @@ YAZ_EXPORT int cs_set_ssl_ctx(COMSTACK cs, void *ctx); YAZ_EXPORT int cs_set_ssl_certificate_file(COMSTACK cs, const char *fname); YAZ_EXPORT int cs_get_peer_certificate_x509(COMSTACK cs, char **buf, int *len); YAZ_EXPORT void cs_set_max_recv_bytes(COMSTACK cs, int max_recv_bytes); -YAZ_EXPORT int completeWAIS(const char *buf, int len); - YAZ_EXPORT void cs_print_session_info(COMSTACK cs); /* diff --git a/include/yaz/oid_util.h b/include/yaz/oid_util.h index e535770..efe4794 100644 --- a/include/yaz/oid_util.h +++ b/include/yaz/oid_util.h @@ -46,8 +46,6 @@ typedef enum oid_proto PROTO_NOP=0, PROTO_Z3950, PROTO_SR, - PROTO_GENERAL, - PROTO_WAIS, PROTO_HTTP } oid_proto; diff --git a/src/Makefile.am b/src/Makefile.am index 2564e03..65bf742 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -82,7 +82,7 @@ libyaz_la_SOURCES=base64.c version.c options.c log.c \ odr_seq.c odr_oct.c ber_oct.c odr_bit.c ber_bit.c odr_oid.c \ ber_oid.c odr_use.c odr_choice.c odr_any.c ber_any.c odr.c odr_mem.c \ dumpber.c odr_enum.c odr-priv.h \ - comstack.c tcpip.c waislen.c unix.c \ + comstack.c tcpip.c unix.c \ prt-ext.c \ ill-get.c \ zget.c yaz-ccl.c diag-entry.c diag-entry.h \ diff --git a/src/tcpip.c b/src/tcpip.c index e712c0e..441a010 100644 --- a/src/tcpip.c +++ b/src/tcpip.c @@ -227,10 +227,7 @@ COMSTACK tcpip_type(int s, int flags, int protocol, void *vp) sp->altbuf = 0; sp->altsize = sp->altlen = 0; sp->towrite = sp->written = -1; - if (protocol == PROTO_WAIS) - sp->complete = completeWAIS; - else - sp->complete = cs_complete_auto; + sp->complete = cs_complete_auto; sp->connect_request_buf = 0; sp->connect_request_len = 0; diff --git a/src/unix.c b/src/unix.c index 7fe4b77..6ee2c9d 100644 --- a/src/unix.c +++ b/src/unix.c @@ -165,10 +165,7 @@ COMSTACK unix_type(int s, int flags, int protocol, void *vp) state->altbuf = 0; state->altsize = state->altlen = 0; state->towrite = state->written = -1; - if (protocol == PROTO_WAIS) - state->complete = completeWAIS; - else - state->complete = cs_complete_auto; + state->complete = cs_complete_auto; p->timeout = COMSTACK_DEFAULT_TIMEOUT; TRC(fprintf(stderr, "Created new UNIX comstack\n")); diff --git a/src/waislen.c b/src/waislen.c deleted file mode 100644 index 7f7daf7..0000000 --- a/src/waislen.c +++ /dev/null @@ -1,42 +0,0 @@ -/* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2013 Index Data - * See the file LICENSE for details. - */ -/** - * \file waislen.c - * \brief Implements WAIS package handling - */ -#if HAVE_CONFIG_H -#include -#endif - -#include -#include -/* - * Return length of WAIS package or 0 - */ -int completeWAIS(const char *buf, int len) -{ - int i, lval = 0; - - if (len < 25) - return 0; - if (*buf != '0') - return 0; - /* calculate length */ - for (i = 0; i < 10; i++) - lval = lval * 10 + (buf[i] - '0'); - lval += 25; - if (len >= lval) - return lval; - return 0; -} -/* - * Local variables: - * c-basic-offset: 4 - * c-file-style: "Stroustrup" - * indent-tabs-mode: nil - * End: - * vim: shiftwidth=4 tabstop=8 expandtab - */ - diff --git a/win/makefile b/win/makefile index 6698dc4..f38f36f 100644 --- a/win/makefile +++ b/win/makefile @@ -420,7 +420,6 @@ MISC_OBJS= \ $(OBJDIR)\ccl_stop_words.obj \ $(OBJDIR)\comstack.obj \ $(OBJDIR)\tcpip.obj \ - $(OBJDIR)\waislen.obj \ $(OBJDIR)\ber_any.obj \ $(OBJDIR)\ber_bit.obj \ $(OBJDIR)\ber_bool.obj \