diff options
author | diego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-06-28 08:26:14 +0000 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-11-02 04:11:43 +0200 |
commit | a1b8092c872977e3289e6cf5232d5b534fbd90b8 (patch) | |
tree | 2ee9b6b07f8e25f29fd8a06505c582e13403c171 /stream/network.c | |
parent | 055f411ce338343cf996d256b262b9423ee68a20 (diff) | |
download | mpv-a1b8092c872977e3289e6cf5232d5b534fbd90b8.tar.bz2 mpv-a1b8092c872977e3289e6cf5232d5b534fbd90b8.tar.xz |
Factorize MPlayer/MEncoder version string handling.
The string now resides in a central object file instead of
being duplicated in every file that requires a version string.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31577 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'stream/network.c')
-rw-r--r-- | stream/network.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/stream/network.c b/stream/network.c index cf01bf7144..48d50d5de5 100644 --- a/stream/network.c +++ b/stream/network.c @@ -42,15 +42,13 @@ #include "stream.h" #include "libmpdemux/demuxer.h" #include "m_config.h" - +#include "mpcommon.h" #include "network.h" #include "tcp.h" #include "http.h" #include "cookies.h" #include "url.h" -#include "version.h" - extern int stream_cache_size; /* Variables for the command line option -user, -passwd, -bandwidth, @@ -219,12 +217,10 @@ http_send_request( URL_t *url, off_t pos ) { snprintf(str, 256, "Host: %s", server_url->hostname ); http_set_field( http_hdr, str); if (network_useragent) - { snprintf(str, 256, "User-Agent: %s", network_useragent); - http_set_field(http_hdr, str); - } else - http_set_field( http_hdr, "User-Agent: MPlayer/"VERSION); + snprintf(str, 256, "User-Agent: %s", mplayer_version); + http_set_field(http_hdr, str); if (network_referrer) { char *referrer = NULL; |