projects
/
ir-tcl-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8f91d7f
)
Fix bug with idAuthentication that didn't work for empty group.
author
Adam Dickmeiss
<adam@indexdata.dk>
Wed, 5 Mar 2003 18:02:08 +0000
(18:02 +0000)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Wed, 5 Mar 2003 18:02:08 +0000
(18:02 +0000)
CHANGELOG
patch
|
blob
|
history
ir-tcl.c
patch
|
blob
|
history
diff --git
a/CHANGELOG
b/CHANGELOG
index
92beeea
..
c649ebb
100644
(file)
--- a/
CHANGELOG
+++ b/
CHANGELOG
@@
-1,4
+1,4
@@
-$Id: CHANGELOG,v 1.52 2003-02-23 23:15:31 adam Exp $
+$Id: CHANGELOG,v 1.53 2003-03-05 18:02:08 adam Exp $
06/19/95 Release of ir-tcl-1.0b
------------------------------------------------------
06/19/95 Release of ir-tcl-1.0b
------------------------------------------------------
@@
-161,3
+161,5
@@
$Id: CHANGELOG,v 1.52 2003-02-23 23:15:31 adam Exp $
02/24/03 Release of ir-tcl-1.4.1
------------------------------------------------------
02/24/03 Release of ir-tcl-1.4.1
------------------------------------------------------
+
+05/03/03 Fix bug with idAuthentication that didn't work for empty group.
diff --git
a/ir-tcl.c
b/ir-tcl.c
index
abe271c
..
1cec835
100644
(file)
--- a/
ir-tcl.c
+++ b/
ir-tcl.c
@@
-4,7
+4,10
@@
* See the file LICENSE for details.
*
* $Log: ir-tcl.c,v $
* See the file LICENSE for details.
*
* $Log: ir-tcl.c,v $
- * Revision 1.121 2003-01-30 13:27:07 adam
+ * Revision 1.122 2003-03-05 18:02:08 adam
+ * Fix bug with idAuthentication that didn't work for empty group.
+ *
+ * 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.
*
* Changed version to 1.4.1. Added WIN32 version resource.
* IrTcl ignores unexpected PDU's, rather than die.
*
@@
-789,7
+792,7
@@
static int do_init_request (void *obj, Tcl_Interp *interp,
req->preferredMessageSize = &p->preferredMessageSize;
req->maximumRecordSize = &p->maximumRecordSize;
req->preferredMessageSize = &p->preferredMessageSize;
req->maximumRecordSize = &p->maximumRecordSize;
- if (p->idAuthenticationGroupId)
+ if (p->idAuthenticationGroupId || p->idAuthenticationUserId)
{
Z_IdPass *pass = odr_malloc (p->odr_out, sizeof(*pass));
Z_IdAuthentication *auth = odr_malloc (p->odr_out, sizeof(*auth));
{
Z_IdPass *pass = odr_malloc (p->odr_out, sizeof(*pass));
Z_IdAuthentication *auth = odr_malloc (p->odr_out, sizeof(*auth));
@@
-812,9
+815,7
@@
static int do_init_request (void *obj, Tcl_Interp *interp,
pass->password = NULL;
req->idAuthentication = auth;
}
pass->password = NULL;
req->idAuthentication = auth;
}
- else if (!p->idAuthenticationOpen || !*p->idAuthenticationOpen)
- req->idAuthentication = NULL;
- else
+ else if (p->idAuthenticationOpen && *p->idAuthenticationOpen)
{
Z_IdAuthentication *auth = odr_malloc (p->odr_out, sizeof(*auth));
{
Z_IdAuthentication *auth = odr_malloc (p->odr_out, sizeof(*auth));
@@
-823,6
+824,8
@@
static int do_init_request (void *obj, Tcl_Interp *interp,
auth->u.open = p->idAuthenticationOpen;
req->idAuthentication = auth;
}
auth->u.open = p->idAuthenticationOpen;
req->idAuthentication = auth;
}
+ else
+ req->idAuthentication = NULL;
req->implementationId = p->implementationId;
req->implementationName = p->implementationName;
req->implementationVersion = p->implementationVersion;
req->implementationId = p->implementationId;
req->implementationName = p->implementationName;
req->implementationVersion = p->implementationVersion;
@@
-1184,6
+1187,12
@@
static int do_idAuthentication (void *obj, Tcl_Interp *interp,
{
if (argc == 3)
{
{
if (argc == 3)
{
+ xfree (p->idAuthenticationGroupId);
+ xfree (p->idAuthenticationUserId);
+ xfree (p->idAuthenticationPassword);
+ p->idAuthenticationGroupId = NULL;
+ p->idAuthenticationUserId = NULL;
+ p->idAuthenticationPassword = NULL;
if (argv[2][0] &&
ir_tcl_strdup (interp, &p->idAuthenticationOpen, argv[2])
== TCL_ERROR)
if (argv[2][0] &&
ir_tcl_strdup (interp, &p->idAuthenticationOpen, argv[2])
== TCL_ERROR)
@@
-1191,6
+1200,8
@@
static int do_idAuthentication (void *obj, Tcl_Interp *interp,
}
else if (argc == 5)
{
}
else if (argc == 5)
{
+ xfree (p->idAuthenticationOpen);
+ p->idAuthenticationOpen = NULL;
if (argv[2][0] &&
ir_tcl_strdup (interp, &p->idAuthenticationGroupId, argv[2])
== TCL_ERROR)
if (argv[2][0] &&
ir_tcl_strdup (interp, &p->idAuthenticationGroupId, argv[2])
== TCL_ERROR)
@@
-1207,7
+1218,7
@@
static int do_idAuthentication (void *obj, Tcl_Interp *interp,
}
if (p->idAuthenticationOpen)
Tcl_AppendElement (interp, p->idAuthenticationOpen);
}
if (p->idAuthenticationOpen)
Tcl_AppendElement (interp, p->idAuthenticationOpen);
- else if (p->idAuthenticationGroupId)
+ else if (p->idAuthenticationGroupId || p->idAuthenticationUserId)
{
Tcl_AppendElement (interp, p->idAuthenticationGroupId);
Tcl_AppendElement (interp, p->idAuthenticationUserId);
{
Tcl_AppendElement (interp, p->idAuthenticationGroupId);
Tcl_AppendElement (interp, p->idAuthenticationUserId);