In Netbios(),

- set ncb_retcode and ncb_cmd_cplt for NCB_ADDNAME
- always make sure adapters have been enumerated.
This commit is contained in:
Juan Lang 2004-12-16 14:34:47 +00:00 committed by Alexandre Julliard
parent 6ab1bc9696
commit e0399f6c10
1 changed files with 13 additions and 11 deletions

View File

@ -793,21 +793,23 @@ UCHAR WINAPI Netbios(PNCB ncb)
if (cmd == NCBENUM)
ncb->ncb_retcode = ncb->ncb_cmd_cplt = ret = nbEnum(ncb);
else if (cmd == NCBADDNAME)
{
FIXME("NCBADDNAME: stub, returning success");
ncb->ncb_retcode = ncb->ncb_cmd_cplt = ret = NRC_GOODRET;
}
else
{
NetBIOSAdapter *adapter = nbGetAdapter(ncb->ncb_lana_num);
NetBIOSAdapter *adapter;
/* Apps not specifically written for WinNT won't do an NCBENUM first,
* so make sure the table has been enumerated at least once
*/
if (!gNBTable.enumerated)
nbInternalEnum();
adapter = nbGetAdapter(ncb->ncb_lana_num);
if (!adapter)
{
if (cmd == NCBRESET || cmd == NCBADDNAME)
{
if (cmd == NCBADDNAME)
FIXME("NCBADDNAME: stub, returning success");
ret = NRC_GOODRET;
}
else
ret = NRC_BRIDGE;
}
ret = NRC_BRIDGE;
else
{
if (adapter->shuttingDown)