am 8961cd24: Fix for zero-sized corrupted license files
* commit '8961cd2404b7064d69288b5572ffd0d454004280': Fix for zero-sized corrupted license files
This commit is contained in:
@@ -568,13 +568,12 @@ void CdmSession::OnTimerEvent(bool update_usage) {
|
||||
if (update_usage && has_decrypted_recently_) {
|
||||
policy_engine_->DecryptionEvent();
|
||||
has_decrypted_recently_ = false;
|
||||
if (is_offline_ && !is_release_) {
|
||||
StoreLicense(DeviceFiles::kLicenseStateActive);
|
||||
}
|
||||
}
|
||||
policy_engine_->OnTimerEvent(&event_occurred, &event);
|
||||
|
||||
if (is_offline_ && !is_release_) {
|
||||
StoreLicense(DeviceFiles::kLicenseStateActive);
|
||||
}
|
||||
|
||||
if (event_occurred) {
|
||||
for (CdmEventListenerIter iter = listeners_.begin();
|
||||
iter != listeners_.end(); ++iter) {
|
||||
|
||||
@@ -71,7 +71,9 @@ bool File::Open(const std::string& name, int flags) {
|
||||
}
|
||||
|
||||
void File::Close() {
|
||||
if (impl_->file_) {
|
||||
if (impl_->file_){
|
||||
fflush(impl_->file_);
|
||||
fsync(fileno(impl_->file_));
|
||||
fclose(impl_->file_);
|
||||
impl_->file_ = NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user