can anybody point me where is the unwiding object in this code
Code:
DWORD WINAPI MAC_out_Thread( LPVOID lpParam ) {
int size_of_LLC_out_Queue= 0;
mac_frame MAC_FRAME_TEMPLATE;
DWORD MAC_QU_WaitResult, LLC_QU_WaitResult, ARP_TABLE_WaitResult;
LLC_QU_WaitResult = WaitForSingleObject(LLC_out_Queue_Mutex,INFINITE);
string mac = GetMACaddress();
while(1){
switch (LLC_QU_WaitResult)
{
case WAIT_OBJECT_0:
__try {
ARP_TABLE_WaitResult = WaitForSingleObject(ARP_table_Mutex,INFINITE);
switch (ARP_TABLE_WaitResult)
{
case WAIT_OBJECT_0:
__try {
size_of_LLC_out_Queue = LLC_out_Queue.size();
if(size_of_LLC_out_Queue > 0)
{
ARP_iterator = ARP.find(LLC_out_Queue[LLC_out_Queue.size() - 1].data.DIP);
if (ARP_iterator != ARP.end())
strcpy(MAC_FRAME_TEMPLATE.DA,ARP_iterator->second.c_str());
else
strcpy(MAC_FRAME_TEMPLATE.DA,FAKE_MAC_Switch.c_str());
MAC_FRAME_TEMPLATE.data = LLC_out_Queue[LLC_out_Queue.size() - 1];
strcpy(MAC_FRAME_TEMPLATE.SA,mac.c_str());
LLC_out_Queue.pop_back();
MAC_out_Queue.push_back(MAC_FRAME_TEMPLATE);
}
}
__finally {
ReleaseMutex(ARP_table_Mutex);
}
}
}
__finally {
ReleaseMutex(LLC_out_Queue_Mutex);
}
break;
}
Sleep(400);
LLC_QU_WaitResult = WaitForSingleObject(LLC_out_Queue_Mutex,INFINITE);
}
return 0;
}
Comment