[vlc-devel] [vlc-commits] upnp: Switch to an unlimited maximum content length
Naohiro KORIYAMA
nkoriyama at gmail.com
Tue Dec 20 11:14:23 CET 2011
2011/12/20 Mirsal Ennaime <git at videolan.org>:
> vlc | branch: master | Mirsal Ennaime <mirsal at videolan.org> | Tue Dec 20 08:34:45 2011 +0100| [794557eea63853456cf3120cdb1bdc88ca44ad9f] | committer: Mirsal Ennaime
>
> upnp: Switch to an unlimited maximum content length
>
> Use INT_MAX as the maximum content length as libupnp introduced 0 as an
> unlimited content length in pupnp 1.6.7, though UPNP_VERSION was not bumped.
>
>> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=794557eea63853456cf3120cdb1bdc88ca44ad9f
> ---
>
> modules/services_discovery/upnp.cpp | 12 ++++++++++++
> 1 files changed, 12 insertions(+), 0 deletions(-)
>
> diff --git a/modules/services_discovery/upnp.cpp b/modules/services_discovery/upnp.cpp
> index 075c9dd..84cf3c4 100644
> --- a/modules/services_discovery/upnp.cpp
> +++ b/modules/services_discovery/upnp.cpp
> @@ -136,6 +136,18 @@ static int Open( vlc_object_t *p_this )
> return VLC_EGENERIC;
> }
>
> + /* libupnp does not treat a maximum content length of 0 as unlimited
> + * until 64dedf (~ pupnp v1.6.7) and provides no sane way to discriminate
> + * between versions */
> + if( (i_res = UpnpSetMaxContentLength( INT_MAX )) != UPNP_E_SUCCESS )
> + {
> + msg_Err( p_sd, "Failed to set maximum content length: %s",
> + UpnpGetErrorMessage( i_res ));
> +
> + Close( (vlc_object_t*) p_sd );
> + return VLC_EGENERIC;
> + }
> +
> return VLC_SUCCESS;
> }
>
win32 build failed because INT_MAX is not defined.
#include <climits>
or
#include <limits.h>
is required.
--
KORIYAMA, Naohiro
nkoriyama at gmail.com
More information about the vlc-devel
mailing list