save works
This commit is contained in:
parent
b1faeb94b6
commit
b748e30d20
35 changed files with 1247 additions and 2149 deletions
|
|
@ -47,10 +47,11 @@ int get_ep_role(endpoint_t* ep)
|
|||
return priv->role;
|
||||
}
|
||||
|
||||
worker_t* get_ep_worker(cluster_t* c, endpoint_t* ep, int op)
|
||||
worker_t* get_ep_worker(cluster_t* c, endpoint_t* ep)
|
||||
{
|
||||
int role, idx;
|
||||
worker_t* w = NULL;
|
||||
worker_t* w = NULL;
|
||||
int rc = 0;
|
||||
|
||||
role = get_ep_role(ep);
|
||||
if (role != HostRole_worker) {
|
||||
|
|
@ -64,7 +65,11 @@ worker_t* get_ep_worker(cluster_t* c, endpoint_t* ep, int op)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
w = workermgr_lock_byid(&(c->workermgr), idx, op);
|
||||
rc = key_find(c->workermgr, (void*)idx, (void**)&w);
|
||||
if (rc < 0) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (w == NULL) {
|
||||
ERROR("can not find worker with id (%d)", idx);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue