clear mirrors when re-reading

This commit is contained in:
David Rose 2010-06-18 17:36:41 +00:00
parent 4b15eab071
commit fa35e0c058

View File

@ -204,6 +204,7 @@ begin() {
if (!success) { if (!success) {
// Go download the latest contents.xml file. // Go download the latest contents.xml file.
_download_url_prefix = _standard_url_prefix; _download_url_prefix = _standard_url_prefix;
_mirrors.clear();
ostringstream strm; ostringstream strm;
strm << _download_url_prefix << "contents.xml"; strm << _download_url_prefix << "contents.xml";
@ -694,10 +695,11 @@ stream_as_file(NPStream *stream, const char *fname) {
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
// Function: PPInstance::handle_request // Function: PPInstance::handle_request
// Access: Public // Access: Public
// Description: Handles a request from the plugin, forwarding // Description: Handles a request from the Core API or the
// it to the browser as appropriate. Returns true if we // application, forwarding it to the browser as
// should continue the request loop, or false to return // appropriate. Returns true if we should continue the
// (temporarily) to JavaScript. // request loop, or false to return (temporarily) to
// JavaScript.
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
bool PPInstance:: bool PPInstance::
handle_request(P3D_request *request) { handle_request(P3D_request *request) {
@ -1171,6 +1173,7 @@ start_download(const string &url, PPDownloadRequest *req) {
bool PPInstance:: bool PPInstance::
read_contents_file(const string &contents_filename, bool fresh_download) { read_contents_file(const string &contents_filename, bool fresh_download) {
_download_url_prefix = _standard_url_prefix; _download_url_prefix = _standard_url_prefix;
_mirrors.clear();
TiXmlDocument doc(contents_filename.c_str()); TiXmlDocument doc(contents_filename.c_str());
if (!doc.LoadFile()) { if (!doc.LoadFile()) {