* Sebastian Hammer, Adam Dickmeiss
*
* $Log: ir-tcl.c,v $
- * Revision 1.74 1996-02-05 17:58:03 adam
+ * Revision 1.75 1996-02-19 15:41:53 adam
+ * Better log messages.
+ * Minor improvement of connect method.
+ *
+ * Revision 1.74 1996/02/05 17:58:03 adam
* Ported ir-tcl to use the beta releases of tcl7.5/tk4.1.
*
* Revision 1.73 1996/01/29 11:35:19 adam
interp->result = "already connected";
return TCL_ERROR;
}
- if (ir_tcl_strdup (interp, &p->hostname, argv[2]) == TCL_ERROR)
- return TCL_ERROR;
if (!strcmp (p->comstackType, "tcpip"))
{
p->cs_link = cs_create (tcpip_type, CS_BLOCK, p->protocol_type);
p->comstackType, NULL);
return TCL_ERROR;
}
+ if (ir_tcl_strdup (interp, &p->hostname, argv[2]) == TCL_ERROR)
+ return TCL_ERROR;
#if IRTCL_GENERIC_FILES
#ifdef WINDOWS
p->csFile = Tcl_GetFile (cs_fileno(p->cs_link), TCL_WIN_SOCKET);
do_disconnect (p, NULL, 2, NULL);
return TCL_ERROR;
}
- logf(LOG_DEBUG, "cs_connect() returned %d", r);
+ logf(LOG_DEBUG, "cs_connect() returned %d fd=%d", r,
+ cs_fileno(p->cs_link));
p->eventType = "connect";
#if IRTCL_GENERIC_FILES
ir_select_add (p->csFile, p);
}
if (p->hostname)
{
+ logf(LOG_DEBUG, "Closing connection to %s", p->hostname);
free (p->hostname);
p->hostname = NULL;
#if IRTCL_GENERIC_FILES
odr_reset (p->odr_in);
assert (p->cs_link);
- logf(LOG_DEBUG, "Closing connection");
cs_close (p->cs_link);
p->cs_link = NULL;
#if IRTCL_GENERIC_FILES
}
#endif
- logf (LOG_DEBUG, "ir object create");
+ logf (LOG_DEBUG, "ir object create %s", argv[1]);
obj->odr_in = odr_createmem (ODR_DECODE);
obj->odr_out = odr_createmem (ODR_ENCODE);
obj->odr_pr = odr_createmem (ODR_PRINT);
Tcl_CmdInfo cmd_info;
const char *apdu_call;
- logf(LOG_DEBUG, "Read handler");
+ logf(LOG_DEBUG, "Read handler fd=%d", cs_fileno(p->cs_link));
if (p->state == IR_TCL_R_Connecting)
{
logf(LOG_DEBUG, "Connect handler");
int r;
IrTcl_Request *rq;
- logf (LOG_DEBUG, "Write handler");
+ logf (LOG_DEBUG, "Write handler fd=%d", cs_fileno(p->cs_link));
if (p->state == IR_TCL_R_Connecting)
{
logf(LOG_DEBUG, "Connect handler");
* OF THIS SOFTWARE.
*
* $Log: ir-tcl.h,v $
- * Revision 1.12 1996-02-05 17:58:04 adam
+ * Revision 1.13 1996-02-19 15:41:54 adam
+ * Better log messages.
+ * Minor improvement of connect method.
+ *
+ * Revision 1.12 1996/02/05 17:58:04 adam
* Ported ir-tcl to use the beta releases of tcl7.5/tk4.1.
*
* Revision 1.11 1995/09/21 13:11:52 adam
#ifndef IR_TCL_H
#define IR_TCL_H
-#if TCL_MAJOR_VERSION > 7 || (TCL_MAJOR_VERSION == 7 && TCL_MINOR_VERSION >= 5)
+#if 0
#define IRTCL_GENERIC_FILES 1
#else
#define IRTCL_GENERIC_FILES 0
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: queue.c,v $
- * Revision 1.6 1996-02-06 09:22:54 adam
+ * Revision 1.7 1996-02-19 15:41:55 adam
+ * Better log messages.
+ * Minor improvement of connect method.
+ *
+ * Revision 1.6 1996/02/06 09:22:54 adam
* Ported ir-tcl to use beta releases of tcl7.5/tk4.1.
*
* Revision 1.5 1995/11/28 13:53:40 quinn
}
else
{
- logf (LOG_DEBUG, "Send %s (%d bytes)", msg, rp->len_out);
+ logf (LOG_DEBUG, "Send %s (%d bytes) fd=%d", msg, rp->len_out,
+ cs_fileno(p->cs_link));
p->state = IR_TCL_R_Waiting;
free (rp->buf_out);
rp->buf_out = NULL;