PengZheng opened a new issue, #526:
URL: https://github.com/apache/celix/issues/526

   There is one remaining use of `bundle_getBundleLocation`:
   
   ```C
   bundle_pt framework_getBundle(framework_pt framework, const char* location) {
       bundle_t *bnd = NULL;
   
       celixThreadMutex_lock(&framework->installedBundles.mutex);
       int size = celix_arrayList_size(framework->installedBundles.entries);
       for (int i = 0; i < size; ++i) {
           celix_framework_bundle_entry_t *entry = 
celix_arrayList_get(framework->installedBundles.entries, i);
           const char *loc = NULL;
           bundle_getBundleLocation(entry->bnd, &loc);
           if (loc != NULL && location != NULL && strncmp(loc, location, 
strlen(loc)) == 0) {
               bnd = entry->bnd;
               break;
           }
       }
       celixThreadMutex_unlock(&framework->installedBundles.mutex);
   
       return bnd;
   }
   ```
   
   Note that `framework->installedBundles.mutex` does not protect against 
`bundleArchive_revise`.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@celix.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to