From f4dfdf10de44985020d90581aa426d106dddc542 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Thu, 30 Jan 2003 13:27:07 +0000 Subject: [PATCH] Changed version to 1.4.1. Added WIN32 version resource. IrTcl ignores unexpected PDU's, rather than die. --- CHANGELOG | 4 +++- Makefile.in | 4 ++-- ir-tcl.c | 21 +++++++++++++++------ irtdb.tcl | 2 +- win/makefile | 39 +++++++++++++++++++++++++++++++++------ 5 files changed, 54 insertions(+), 16 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index fd2ab00..0c2fb08 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,4 +1,4 @@ -$Id: CHANGELOG,v 1.50 2002-09-13 20:23:56 adam Exp $ +$Id: CHANGELOG,v 1.51 2003-01-30 13:27:07 adam Exp $ 06/19/95 Release of ir-tcl-1.0b ------------------------------------------------------ @@ -154,3 +154,5 @@ $Id: CHANGELOG,v 1.50 2002-09-13 20:23:56 adam Exp $ SearchResponse) 09/13/02 Debian package. + +01/30/03 IrTcl ignores multiple "unexpected" response PDU's. diff --git a/Makefile.in b/Makefile.in index 9519782..62768de 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,11 +1,11 @@ # IR toolkit for tcl/tk # (c) Index Data 1995-1999 # See the file LICENSE for details. -# $Id: Makefile.in,v 1.58 2002-09-13 20:23:56 adam Exp $ +# $Id: Makefile.in,v 1.59 2003-01-30 13:27:07 adam Exp $ SHELL=/bin/sh # IrTcl Version -VERSION=1.4 +VERSION=1.4.1 # Directory prefix with machine independent files (scripts, setup files, etc.) prefix = @prefix@ diff --git a/ir-tcl.c b/ir-tcl.c index e30cd0d..abe271c 100644 --- a/ir-tcl.c +++ b/ir-tcl.c @@ -1,10 +1,14 @@ /* * IR toolkit for tcl/tk - * (c) Index Data 1995-2002 + * (c) Index Data 1995-2003 * See the file LICENSE for details. * * $Log: ir-tcl.c,v $ - * Revision 1.120 2002-03-20 14:48:54 adam + * Revision 1.121 2003-01-30 13:27:07 adam + * Changed version to 1.4.1. Added WIN32 version resource. + * IrTcl ignores unexpected PDU's, rather than die. + * + * Revision 1.120 2002/03/20 14:48:54 adam * implemented USR.1 SearchResult-1 * * Revision 1.119 2001/12/03 00:31:06 adam @@ -4399,6 +4403,7 @@ static void ir_select_read (ClientData clientData) char *object_name; Tcl_CmdInfo cmd_info; const char *apdu_call; + int round = 0; logf(LOG_DEBUG, "Read handler fd=%d", cs_fileno(p->cs_link)); if (p->state == IR_TCL_R_Connecting) @@ -4437,6 +4442,8 @@ static void ir_select_read (ClientData clientData) { p->state = IR_TCL_R_Reading; + round++; + yaz_log(LOG_DEBUG, "round %d", round); /* read incoming APDU */ if ((r=cs_get (p->cs_link, &p->buf_in, &p->len_in)) == 1) { @@ -4481,10 +4488,12 @@ static void ir_select_read (ClientData clientData) } /* handle APDU and invoke callback */ rq = p->request_queue; - if (!rq) - { - logf (LOG_FATAL, "Internal error. No queue entry"); - exit (1); + if (!rq) + { + /* no corresponding request. Skip it. */ + logf(LOG_DEBUG, "no corresponding request. Skipping it"); + p->state = IR_TCL_R_Idle; + return; } object_name = rq->object_name; logf (LOG_DEBUG, "Object %s", object_name); diff --git a/irtdb.tcl b/irtdb.tcl index 78d8324..7e5b87a 100644 --- a/irtdb.tcl +++ b/irtdb.tcl @@ -559,7 +559,7 @@ set profile(indexdata,smallSetUpperBound) 0 set profile(indexdata,targetInfoName) Zebra set profile(indexdata,timeDefine) 944954185 set profile(indexdata,timeLastExplain) 1007339347 -set profile(indexdata,timeLastInit) 971253620 +set profile(indexdata,timeLastInit) 1043924972 set profile(indexdata,welcomeMessage) {} set profile(indexdata,windowNumber) 20 set profile(localhost,authentication) {} diff --git a/win/makefile b/win/makefile index 451b712..84a86b6 100644 --- a/win/makefile +++ b/win/makefile @@ -1,8 +1,8 @@ # IRTCL makefile for MS NMAKE -# $Id: makefile,v 1.2 2001-12-03 00:31:06 adam Exp $ +# $Id: makefile,v 1.3 2003-01-30 13:27:07 adam Exp $ # # Log at the end of the file -VERSION=1.4 +VERSION=1.4.1 ########################################################### ############### Parameters @@ -22,8 +22,8 @@ all: dirs irtcl ROOTDIR=.. # The home of IRTCL # TCL include files, libraries, etc. -TCLINCL="c:\program files\tcl\include" -TCLLIB="c:\program files\tcl\lib\tcl82.lib" +TCLINCL="c:\tcl\include" +TCLLIB="c:\tcl\lib\tcl83.lib" # YAZ include files, libraries, etc. YAZDIR=$(ROOTDIR)\..\YAZ @@ -164,14 +164,37 @@ ALL_OBJS=$(IRTCL_OBJS) @$(CPP) $(COPT) $< ########################################################### +############### Resources +########################################################### + +### The RC compiler (resource files) +RSC=rc.exe +COMMON_RC_OPTIONS= /l 0x406 /i"$(ROOTDIR)" +DEBUG_RC_OPTIONS=/d "_DEBUG" +RELEASE_RC_OPTIONS=/d "NDEBUG" + +RES=$(OBJDIR)\irtcl.res +RC=$(WINDIR)\irtcl.rc + +!if $(DEBUG) +RSOPT=/d_DEBUG +!else +RSOPT=/d_NDEBUG +!endif + +$(RES): $(RC) + $(RSC) $(RSOPT) /fo"$(RES)" $(RC) + +########################################################### ############### Linking ########################################################### -$(IRTCLDLL) : "$(BINDIR)" $(IRTCL_OBJS) +$(IRTCLDLL) : "$(BINDIR)" $(IRTCL_OBJS) $(RES) @echo Linking irtcl DLL $(IRTCLDLL) $(LINK) $(IRTCL_LINK_OPTIONS) @<< /nologo $(IRTCL_OBJS) + $(RES) /out:$(IRTCLDLL) $(YAZLIB) $(TCLLIB) @@ -213,7 +236,11 @@ $(ALL_OBJS): makefile ########################################################### # # $Log: makefile,v $ -# Revision 1.2 2001-12-03 00:31:06 adam +# Revision 1.3 2003-01-30 13:27:07 adam +# Changed version to 1.4.1. Added WIN32 version resource. +# IrTcl ignores unexpected PDU's, rather than die. +# +# Revision 1.2 2001/12/03 00:31:06 adam # Towards 1.4. Configure updates. # # Revision 1.1 1999/09/10 10:02:29 adam -- 1.7.10.4