Hello Scott.
Today I wrote:
> I see following bug:
> - PC1 runs Kaboodle (Win 2000 OS),
> - PC2 starts Kaboodle with empty registry settings (Win 2000 OS).
> After all screen updating the PC1 icon doesn't have
> "Kaboodle" halo on the PC2 machine.
Here is what I found about "NID update bug":
PC1 device has lost flags PC_RUNNING | PC_RUNNINGKABOODLE
after calling the function BOOL CNIDDevice::Connect(BOOL bFlag=FALSE).
Let us look into that function.
BOOL CNIDDevice::Connect(BOOL bFlag)
{
if (bFlag) m_Attributes.m_nFlags|=DEVICE_CONNECTED;
else m_Attributes.m_nFlags=m_Attributes.m_nFlags & (!DEVICE_CONNECTED);
return true;
}
If parameter bFlag=TRUE, then the function adds the flag DEVICE_CONNECTED
into the member m_Attributes.m_nFlags - it looks as logistical.
If parameter bFlag=FALSE, then the function removes all flags
from the member m_Attributes.m_nFlags
(the result of operator
m_Attributes.m_nFlags=m_Attributes.m_nFlags & (!DEVICE_CONNECTED);
is m_Attributes.m_nFlags=0)
- it didn't looks as logistical.
I have expected that in case bFlag=FALSE the above function
has to remove the flag DEVICE_CONNECTED from
the member m_Attributes.m_nFlags.
Therefore I have change above function:
BOOL CNIDDevice::Connect(BOOL bFlag)
{
if (bFlag) m_Attributes.m_nFlags |= DEVICE_CONNECTED;
else m_Attributes.m_nFlags &= ~DEVICE_CONNECTED;
return true;
}
Now the NID update bug doesn't appear.
All above changes are in the CVS Server.
******************************************************************
Also I want to notice following.
When I debugged the NID update bug,
I found that the function BOOL CNIDDevice::Connect(BOOL bFlag)
was called with parameter bFlag=FALSE
from the function BOOL CNIDNetwork::UpdateNetworkPCs( char* lpData , int
nDataLen )
from the next part
else if (dev->m_status == ACTIVE && (pingType == PING_ACTIVE || pingType ==
PING_ALL))
{
pDevice = (CNIDDevice*)m_ArrChildDevices[nID];
// if ((pDevice->m_Attributes.m_nFlags & DEVICE_CONNECTED))
{
pDevice->Connect(false);
dev->SetProperties(dev->m_ipAddr,INACTIVE);
bUpdate = 1;
}
}
I didn't familiar with this part of code,
but it seems to me that context of that part
"if (dev->m_status == ACTIVE && (pingType == PING_ACTIVE || pingType ==
PING_ALL))"
expect calling of pDevice->Connect(true),
but don't calling of pDevice->Connect(false).
I want that author of this part of code know that warning.
- Igor
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Kaboodle-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/kaboodle-devel