From ba6b73fab9d6d52fe6148aec52fa9ca7dfb2ecf1 Mon Sep 17 00:00:00 2001 From: David Rose Date: Thu, 17 Jun 2010 22:15:38 +0000 Subject: [PATCH] don't be fooled by a entry in an old contents.xml file --- direct/src/plugin_npapi/ppInstance.cxx | 4 ++++ direct/src/plugin_npapi/ppInstance.h | 1 + 2 files changed, 5 insertions(+) diff --git a/direct/src/plugin_npapi/ppInstance.cxx b/direct/src/plugin_npapi/ppInstance.cxx index 2cd5680086..080f45c024 100644 --- a/direct/src/plugin_npapi/ppInstance.cxx +++ b/direct/src/plugin_npapi/ppInstance.cxx @@ -184,6 +184,7 @@ begin() { url += '/'; } _download_url_prefix = url; + _standard_url_prefix = url; nout << "Plugin is built with " << PANDA_PACKAGE_HOST_URL << "\n"; if (!is_plugin_loaded() && !_failed) { @@ -202,6 +203,7 @@ begin() { if (!success) { // Go download the latest contents.xml file. + _download_url_prefix = _standard_url_prefix; ostringstream strm; strm << _download_url_prefix << "contents.xml"; @@ -1168,6 +1170,8 @@ start_download(const string &url, PPDownloadRequest *req) { //////////////////////////////////////////////////////////////////// bool PPInstance:: read_contents_file(const string &contents_filename, bool fresh_download) { + _download_url_prefix = _standard_url_prefix; + TiXmlDocument doc(contents_filename.c_str()); if (!doc.LoadFile()) { return false; diff --git a/direct/src/plugin_npapi/ppInstance.h b/direct/src/plugin_npapi/ppInstance.h index 02329d1ecf..3c0ec2ceae 100644 --- a/direct/src/plugin_npapi/ppInstance.h +++ b/direct/src/plugin_npapi/ppInstance.h @@ -134,6 +134,7 @@ private: Tokens _tokens; string _root_dir; + string _standard_url_prefix; string _download_url_prefix; typedef vector Mirrors; Mirrors _mirrors;