onpluginfail in more cases

This commit is contained in:
David Rose 2009-12-10 23:38:40 +00:00
parent 97f711de8c
commit 086e53a453
2 changed files with 12 additions and 6 deletions

View File

@ -417,7 +417,10 @@ int PPInstance::DownloadP3DComponents( std::string& p3dDllFilename )
}
}
}
if (error) {
set_failed();
}
return error;
}
@ -448,7 +451,6 @@ int PPInstance::LoadPlugin( const std::string& dllFilename )
nout << "Attempting to load core API from " << pathname << "\n";
if (!load_plugin(pathname, "", "", true, "", "", "", false, false, nout)) {
nout << "Unable to launch core API in " << pathname << "\n";
set_failed();
error = 1;
} else {
#ifdef PANDA_OFFICIAL_VERSION
@ -464,6 +466,9 @@ int PPInstance::LoadPlugin( const std::string& dllFilename )
}
}
if (error) {
set_failed();
}
return error ;
}

View File

@ -480,7 +480,7 @@ url_notify(const char *url, NPReason reason, void *notifyData) {
string contents_filename = _root_dir + "/contents.xml";
if (!read_contents_file(contents_filename)) {
nout << "Unable to read contents file " << contents_filename << "\n";
// TODO: fail
set_failed();
}
}
}
@ -1107,7 +1107,7 @@ downloaded_file(PPDownloadRequest *req, const string &filename) {
string contents_filename = _root_dir + "/contents.xml";
if (!read_contents_file(contents_filename)) {
nout << "Unable to read contents file " << contents_filename << "\n";
// TODO: fail
set_failed();
}
}
break;
@ -1231,7 +1231,7 @@ downloaded_plugin(const string &filename) {
return;
}
// TODO: fail
set_failed();
return;
}
@ -1239,12 +1239,13 @@ downloaded_plugin(const string &filename) {
string pathname = _core_api_dll.get_pathname(_root_dir);
if (!copy_file(filename, pathname)) {
nout << "Couldn't copy " << pathname << "\n";
set_failed();
return;
}
if (!_core_api_dll.quick_verify(_root_dir)) {
nout << "After copying, " << pathname << " is no good.\n";
// TODO: fail
set_failed();
return;
}