diff --git a/upnp/src/ssdp/ssdp_device.c b/upnp/src/ssdp/ssdp_device.c index c8ce19d..ad6a2a9 100644 --- a/upnp/src/ssdp/ssdp_device.c +++ b/upnp/src/ssdp/ssdp_device.c @@ -242,7 +242,7 @@ NewRequestHandler( IN struct sockaddr_in *DestAddr, // "If a multicast resource would send a response(s) to any copy of the // request, it SHOULD send its response(s) to each copy of the request // it receives. It MUST NOT repeat its response(s) per copy of the - // reuqest." + // request." // // http://www.upnp.org/download/draft-goland-http-udp-04.txt // @@ -530,7 +530,6 @@ SendReply( IN struct sockaddr_in *DestAddr, * IN char * Udn: Device UDN * IN char * Location: Location of Device description document. * IN int Duration :Life time of this device. - * Description: * This function creates the reply packet based on the input parameter, * and send it to the client address given in its input parameter DestAddr. diff --git a/upnp/src/ssdp/ssdp_server.c b/upnp/src/ssdp/ssdp_server.c index 2fd7a46..1713dd9 100644 --- a/upnp/src/ssdp/ssdp_server.c +++ b/upnp/src/ssdp/ssdp_server.c @@ -322,8 +322,9 @@ int AdvertiseAndReply( IN int AdFlag, } for( j = 0;; j++ ) { tmpNode = ixmlNodeList_item( nodeList, j ); - if( tmpNode == NULL ) + if( tmpNode == NULL ) { break; + } ixmlNodeList_free( tmpNodeList ); tmpNodeList = NULL; @@ -332,7 +333,7 @@ int AdvertiseAndReply( IN int AdFlag, if( tmpNodeList == NULL ) { UpnpPrintf( UPNP_CRITICAL, API, __FILE__, __LINE__, "ServiceType not found \n" ); - continue; + continue; } tmpNode2 = ixmlNodeList_item( tmpNodeList, 0 ); if( tmpNode2 == NULL ) { @@ -365,26 +366,21 @@ int AdvertiseAndReply( IN int AdFlag, } else { switch ( SearchType ) { case SSDP_ALL: - { - ServiceReply( DestAddr, servType, - UDNstr, SInfo->DescURL, - defaultExp ); - break; - } + ServiceReply( DestAddr, servType, + UDNstr, SInfo->DescURL, + defaultExp ); + break; case SSDP_SERVICE: - { - if( ServiceType != NULL ) { - if( !strncasecmp( ServiceType, - servType, - strlen( ServiceType ) ) ) - { - ServiceReply( DestAddr, servType, - UDNstr, SInfo->DescURL, - defaultExp ); - } + if( ServiceType != NULL ) { + if( !strncasecmp( ServiceType, + servType, + strlen( ServiceType ) ) ) { + ServiceReply( DestAddr, servType, + UDNstr, SInfo->DescURL, + defaultExp ); } - break; } + break; default: break; } // switch(SearchType)