Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

NWDSMapIDToName retuns -303

14 views
Skip to first unread message

Robert Hochenburger

unread,
Feb 20, 2006, 9:18:01 AM2/20/06
to
My NLM (running on NetWare 6.5 SP5) authenticates to a remote server and
calls NWDSMapIDToName on top of this NDS connection many times -- mostly
without any problem. However, suddenly something may go mad: NWDSMapIDToName
returns -303 (FFFFFED1). Once this has happened, all subsequent
NWDSMapIDToName calls return -303 forever (or until I disconnect from and
re-connect to the same server).

According to
http://www.novell.com/documentation//nwec/nwec/data/al39ngz.html#al39ngz
'The program is trying to pass a bad context parameter to an eDirectory or
NDS call. This is an internal program error.'

So the context must be bad however all input parameters (context, connHandle
and 'objectID') are -- in this example scenario -- constant. The NDS
connection does not get damaged since I am still able to access the remote
file system through it without any problem.

As an explanation, please find below the debug log of the input parameters
and the return code of NWDSMapIDToName.

Thanks in advance for your help!


Sequence 1 (I am lucky -- this time everything is O.K.)
context=00000000, connHandle=43B73040, objectID=9F820000,
return_code=00000000
context=00000000, connHandle=43B73040, objectID=9F820000,
return_code=00000000
context=00000000, connHandle=43B73040, objectID=9F820000,
return_code=00000000
...
context=00000000, connHandle=43B73040, objectID=9F820000,
return_code=00000000
...


Sequence 2 (I am unlucky -- this time something goes mad!)
context=00000000, connHandle=43B73040, objectID=9F820000,
return_code=00000000
context=00000000, connHandle=43B73040, objectID=9F820000,
return_code=00000000
...
context=00000000, connHandle=43B73040, objectID=9F820000,
return_code=00000000
context=00000000, connHandle=43B73040, objectID=9F820000,
return_code=00000000
context=00000000, connHandle=43B73040, objectID=9F820000,
return_code=FFFFFED1 // <--- something went mad!
context=00000000, connHandle=43B73040, objectID=9F820000,
return_code=FFFFFED1
context=00000000, connHandle=43B73040, objectID=9F820000,
return_code=FFFFFED1
...
context=00000000, connHandle=43B73040, objectID=9F820000,
return_code=FFFFFED1
...


Roger Thomas, DevNet SysOp 22

unread,
Feb 20, 2006, 2:27:09 PM2/20/06
to
Can you post a basic program that shows the problem so people can
comment.

Roger Thomas, DevNet SysOp 22

"Robert Hochenburger" <NO.ho...@cnw.SPAM.hu> wrote in message news:tckKf.2478$yg2...@prv-forum2.provo.novell.com...

Robert Hochenburger

unread,
Feb 21, 2006, 5:53:10 AM2/21/06
to
Please find below a bare-bone code example (this time without
ConsolePrintf-ing the parameters/status of NWDSMapIDToName).
Greetings,
Robert

NWCONN_HANDLE connHandle;
NWDSContextHandle context;
unsigned long contextFlags;
char dn [MAX_DN_CHARS + 1];

NWDSCreateContextHandle (&context);
NWDSSetContext (context, DCK_TREE_NAME, "MYTREE");
NWDSSetContext (context, DCK_NAME_CONTEXT, "[Root]");
NWDSGetContext (context, DCK_FLAGS, &contextFlags))) {
contextFlags |= DCV_TYPELESS_NAMES;
NWDSSetContext (context, DCK_FLAGS, &contextFlags);
NWDSLogin (context, 0, "Admin.Company", "password", 0);
NWCCOpenConnByName (0, "FS1", NWCC_NAME_FORMAT_BIND, NWCC_OPEN_LICENSED,
NWCC_TRAN_TYPE_WILD, &connHandle);
NWDSAuthenticateConn (context, connHandle);
NWCCSetCurrentConnection (connHandle);

for ( ; ; ) {
NWDSMapIDToName (context, connHandle, 0x9F820000, dn);
getch ();
}


"Roger Thomas, DevNet SysOp 22" <dev...@novell.com> wrote in message
news:hKoKf.2751$yg2....@prv-forum2.provo.novell.com...

Roger Thomas, DevNet SysOp 22

unread,
Feb 21, 2006, 4:48:59 PM2/21/06
to
To be honest I can't see any issues as long as the following line
is a typo

NWDSGetContext (context, DCK_FLAGS, &contextFlags))) {

The only time I've see a report of this type of area the TID stated
that a dsrepair of the file system was needed, but that involved an
ID being returned from the file system that eDir could not resolve in
its database.

What version of NW is the remote server?

Roger Thomas, DevNet SysOp 22

"Robert Hochenburger" <NO.ho...@cnw.SPAM.hu> wrote in message news:qiCKf.3278$yg2...@prv-forum2.provo.novell.com...

John Baird

unread,
Feb 23, 2006, 5:07:35 AM2/23/06
to
When using the NWDS APIs from a client based program a -300 series error
indicates a problem at the client end, i..e an error has occurred before any
attempt was made to communicate with the target server. I would guess that
either something has gone wrong with the state of your connection to the
remote server, or something has gotten corrupted in the structure pointed to
by your context handle. Does your NLM have multiple threads running?

John

"Roger Thomas, DevNet SysOp 22" <dev...@novell.com> wrote in message

news:fVLKf.3967$yg2...@prv-forum2.provo.novell.com...

Robert Hochenburger

unread,
Feb 23, 2006, 5:31:00 AM2/23/06
to
Suffix
)) {
is definitely a typo (I have missed to truncate the end of this line along
with the other parts of the code).

The version of the remote servers is NetWare 6.5 SP4/SP5.

Robert

"Roger Thomas, DevNet SysOp 22" <dev...@novell.com> wrote in message

news:fVLKf.3967$yg2...@prv-forum2.provo.novell.com...

Robert Hochenburger

unread,
Feb 23, 2006, 5:56:08 AM2/23/06
to
At the time when the error occurs there is only a single thread running.

Robert

"John Baird" <jo...@jrbsoftware.com> wrote in message
news:HPfLf.5576$yg2...@prv-forum2.provo.novell.com...

Robert Hochenburger

unread,
Mar 2, 2006, 11:45:19 AM3/2/06
to
John,

you are right: both DSTRACE (running on the target server) and a Sniffer
trace shows that the current NWDSMapIDToName call does not generate any
network traffic.

Robert

"John Baird" <jo...@jrbsoftware.com> wrote in message
news:HPfLf.5576$yg2...@prv-forum2.provo.novell.com...

0 new messages