Commit 49815bb5 authored by Mirsal Ennaime's avatar Mirsal Ennaime Committed by Jean-Baptiste Kempf

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.
(cherry picked from commit 794557eea63853456cf3120cdb1bdc88ca44ad9f)
(cherry picked from commit 75a40b63d0cb0ba655a80c4030ce54cb812c471f)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 59934b57
......@@ -38,6 +38,7 @@
#include <vlc_services_discovery.h>
#include <assert.h>
#include <limits.h>
/*
* Constants
......@@ -136,6 +137,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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment