From: Marcelo R. J. <mar...@gm...> - 2010-04-01 12:54:18
|
Hi Sangita, I know its been a long time, but I have been reviewing old problems, and I see a couple in your example. First, contentType_a should be a char *, not a char. And you must pass a char ** to UpnpOpenHttpGet(). Second and related to the above, you were not freeing contentType_a. Look at the documentation of UpnpOpenHttpGet(): /*! * \brief Gets a file specified in a URL. * * The SDK allocates the memory for \b handle and \b contentType, the * application is responsible for freeing this memory. * * \return An integer representing one of the following: * \li \c UPNP_E_SUCCESS: The operation completed successfully. * \li \c UPNP_E_INVALID_PARAM: Either \b url, \b handle, ... * \li \c UPNP_E_BAD_RESPONSE: A bad response was received from the * remote server. */ EXPORT_SPEC int UpnpOpenHttpGet( So, in your example, you should always free(contentType_a) after you call UpnpCloseHttpGet(). Regards, Marcelo. |