src/server/daemon/resourcepool.c

changeset 602
ba31261d3a38
parent 579
e10457d74fe1
child 655
337cda289f34
equal deleted inserted replaced
601:d9bc7c2dfae2 602:ba31261d3a38
228 ResourceDataPrivate *res = (ResourceDataPrivate*)resource; 228 ResourceDataPrivate *res = (ResourceDataPrivate*)resource;
229 ResourcePool *respool = resource->resourcepool; 229 ResourcePool *respool = resource->resourcepool;
230 230
231 if(nsapi_rq && !nsapi_rq->finished) { 231 if(nsapi_rq && !nsapi_rq->finished) {
232 // request processing still ongoing and SAFs will be executed 232 // request processing still ongoing and SAFs will be executed
233 // TODO: future ucx cxMapRemove returns, if it actually removed something, therefore use just cxMapRemove 233 if(cxMapRemove(nsapi_rq->resources, cx_hash_key_str(respool->name))) {
234 void *value;
235 if(!cxMapRemoveAndGet(nsapi_rq->resources, cx_hash_key_str(respool->name), &value)) {
236 log_ereport(LOG_FAILURE, "resourcepool_free: cannot remove resource from request: potential double free"); 234 log_ereport(LOG_FAILURE, "resourcepool_free: cannot remove resource from request: potential double free");
237 } 235 }
238 } 236 }
239 // else: safe to ignore nsapi_rq->resources 237 // else: safe to ignore nsapi_rq->resources
240 238

mercurial