Skip to content

Commit

Permalink
system: nxplayer: Introduce max host and file name for http url
Browse files Browse the repository at this point in the history
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
  • Loading branch information
masayuki2009 authored and xiaoxiang781216 committed May 21, 2020
1 parent 36bce29 commit 8d1f2d5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
12 changes: 12 additions & 0 deletions system/nxplayer/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -129,3 +129,15 @@ config NXPLAYER_HTTP_STREAMING_SUPPORT
audio streaming as well as local file playback.

endif

if NXPLAYER_HTTP_STREAMING_SUPPORT

config NXPLAYER_HTTP_MAXHOSTNAME
int "Max host name in URL"
default 40

config NXPLAYER_HTTP_MAXFILENAME
int "Max file name in URL"
default 100

endif
4 changes: 2 additions & 2 deletions system/nxplayer/nxplayer.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,8 @@ static const int g_known_ext_count = sizeof(g_known_ext) /

static int _open_with_http(const char *fullurl)
{
char relurl[32];
char hostname[32];
char relurl[CONFIG_NXPLAYER_HTTP_MAXFILENAME];
char hostname[CONFIG_NXPLAYER_HTTP_MAXHOSTNAME];
int resp_chk = 0;
char resp_msg[] = "\r\n\r\n";
struct timeval tv;
Expand Down

0 comments on commit 8d1f2d5

Please sign in to comment.