Merge of trunk.

git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.4.x@133 119443c7-1b9e-41f8-b6fc-b9c35fce742c
This commit is contained in:
Marcelo Roberto Jimenez 2007-02-13 13:53:24 +00:00
parent 4bcb9dd5e1
commit aec58e6c9e

View File

@ -3713,8 +3713,6 @@ FreeHandle( int Upnp_Handle )
} /****************** End of FreeHandle *********************/ } /****************** End of FreeHandle *********************/
// **DBG****************************************************
//DBGONLY(
/************************************************************************** /**************************************************************************
* Function: PrintHandleInfo * Function: PrintHandleInfo
@ -3728,29 +3726,33 @@ FreeHandle( int Upnp_Handle )
* Return Values: int * Return Values: int
* UPNP_E_SUCCESS if successful else return appropriate error * UPNP_E_SUCCESS if successful else return appropriate error
***************************************************************************/ ***************************************************************************/
int PrintHandleInfo( IN UpnpClient_Handle Hnd ) { int PrintHandleInfo( IN UpnpClient_Handle Hnd )
struct Handle_Info * HndInfo; if( HandleTable[Hnd] != NULL ) { {
struct Handle_Info * HndInfo;
if (HandleTable[Hnd] != NULL) {
HndInfo = HandleTable[Hnd]; HndInfo = HandleTable[Hnd];
DBGONLY( UpnpPrintf( UPNP_ALL, API, __FILE__, __LINE__, DBGONLY(
"Printing information for Handle_%d\n", UpnpPrintf(UPNP_ALL, API, __FILE__, __LINE__,
Hnd ); "Printing information for Handle_%d\n", Hnd);
UpnpPrintf(UPNP_ALL, API, __FILE__, __LINE__, UpnpPrintf(UPNP_ALL, API, __FILE__, __LINE__,
"HType_%d\n", HndInfo->HType); "HType_%d\n", HndInfo->HType);
DEVICEONLY( DEVICEONLY(
if( HndInfo->HType != if(HndInfo->HType != HND_CLIENT)
HND_CLIENT ) UpnpPrintf( UPNP_ALL, API, __FILE__, UpnpPrintf( UPNP_ALL, API, __FILE__, __LINE__,
__LINE__, "DescURL_%s\n", "DescURL_%s\n", HndInfo->DescURL );
HndInfo->DescURL ); )
) )
)
} else {
return UPNP_E_INVALID_HANDLE;
}
return UPNP_E_SUCCESS;
} }
else
{
return UPNP_E_INVALID_HANDLE;}
return UPNP_E_SUCCESS;}
/****************** End of PrintHandleInfo *********************/ /****************** End of PrintHandleInfo *********************/
void printNodes( IXML_Node * tmpRoot, int depth ) { void printNodes( IXML_Node * tmpRoot, int depth )
{
int i; int i;
IXML_NodeList *NodeList1; IXML_NodeList *NodeList1;
IXML_Node *ChildNode1; IXML_Node *ChildNode1;
@ -3758,26 +3760,27 @@ FreeHandle( int Upnp_Handle )
const DOMString NodeValue; const DOMString NodeValue;
const DOMString NodeName; const DOMString NodeName;
NodeList1 = ixmlNode_getChildNodes(tmpRoot); NodeList1 = ixmlNode_getChildNodes(tmpRoot);
for( i = 0; i < 100; i++ ) { for (i = 0; i < 100; ++i) {
ChildNode1 = ixmlNodeList_item(NodeList1, i); ChildNode1 = ixmlNodeList_item(NodeList1, i);
if (ChildNode1 == NULL) { if (ChildNode1 == NULL) {
break;} break;
}
printNodes(ChildNode1, depth+1); printNodes(ChildNode1, depth+1);
NodeType = ixmlNode_getNodeType(ChildNode1); NodeType = ixmlNode_getNodeType(ChildNode1);
NodeValue = ixmlNode_getNodeValue(ChildNode1); NodeValue = ixmlNode_getNodeValue(ChildNode1);
NodeName = ixmlNode_getNodeName(ChildNode1); NodeName = ixmlNode_getNodeName(ChildNode1);
DBGONLY( UpnpPrintf( UPNP_ALL, API, __FILE__, __LINE__, DBGONLY(
UpnpPrintf(UPNP_ALL, API, __FILE__, __LINE__,
"DEPTH-%2d-IXML_Node Type %d, " "DEPTH-%2d-IXML_Node Type %d, "
"IXML_Node Name: %s, IXML_Node Value: %s\n", "IXML_Node Name: %s, IXML_Node Value: %s\n",
depth, NodeType, NodeName, NodeValue ); ) depth, NodeType, NodeName, NodeValue);
)
}
} }
}
/****************** End of printNodes *********************/ /****************** End of printNodes *********************/
// ) // dbgonly
//******************************************************** //********************************************************
//* Name: getlocalhostname //* Name: getlocalhostname
//* Description: Function to get local IP address //* Description: Function to get local IP address