Skip to content

Commit

Permalink
Remove unused deprecated APIs.
Browse files Browse the repository at this point in the history
  • Loading branch information
PengZheng committed Aug 2, 2023
1 parent 096db1e commit 6c86749
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 22 deletions.
16 changes: 2 additions & 14 deletions libs/framework/src/bundle.c
Original file line number Diff line number Diff line change
Expand Up @@ -334,20 +334,8 @@ celix_status_t bundle_close(const_bundle_pt bundle) {
}

celix_status_t bundle_closeAndDelete(const_bundle_pt bundle) {
celix_status_t status;

bundle_archive_pt archive = NULL;

bundle_closeModules(bundle);
bundle_closeRevisions(bundle);
status = bundle_getArchive(bundle, &archive);
if (status == CELIX_SUCCESS) {
bundleArchive_closeAndDelete(archive);
}

framework_logIfError(bundle->framework->logger, status, NULL, "Failed to close and delete bundle");

return status;
fw_log(bundle->framework->logger, CELIX_LOG_LEVEL_DEBUG, "Usage of bundle_closeAndDelete is deprecated and no longer needed. Called for bundle %s", bundle->symbolicName);
return CELIX_SUCCESS;
}

celix_status_t bundle_closeRevisions(const_bundle_pt bundle) {
Expand Down
14 changes: 6 additions & 8 deletions libs/framework/src/bundle_archive.c
Original file line number Diff line number Diff line change
Expand Up @@ -446,17 +446,15 @@ celix_status_t bundleArchive_close(bundle_archive_pt archive) {
// not yet needed/possible
return CELIX_SUCCESS;
}
//LCOV_EXCL_STOP

celix_status_t bundleArchive_closeAndDelete(bundle_archive_pt archive) {
celix_status_t status = CELIX_SUCCESS;
if (archive->id != CELIX_FRAMEWORK_BUNDLE_ID) {
const char* err = NULL;
status = celix_utils_deleteDirectory(archive->archiveRoot, &err);
framework_logIfError(archive->fw->logger, status, NULL, "Failed to delete archive root '%s': %s", archive->archiveRoot, err);
}
return status;
fw_log(archive->fw->logger,
CELIX_LOG_LEVEL_DEBUG,
"Usage of bundleArchive_closeAndDelete is deprecated and no longer needed. Called for bundle %s",
archive->bundleSymbolicName);
return CELIX_SUCCESS;
}
//LCOV_EXCL_STOP

const char* celix_bundleArchive_getPersistentStoreRoot(bundle_archive_t* archive) {
return archive->storeRoot;
Expand Down

0 comments on commit 6c86749

Please sign in to comment.