unsigned long flags;
lib_me_t *me;
- if (args->index_in < 0 || args->index_in >= tbl->size)
- return ret->rc = PTL_INV_PTINDEX;
+ if (args->index_in >= tbl->size)
+ return ret->rc = PTL_PT_INDEX_INVALID;
/* Should check for valid matchid, but not yet */
if (0)
- return ret->rc = PTL_INV_PROC;
+ return ret->rc = PTL_PROCESS_INVALID;
me = lib_me_alloc (nal);
if (me == NULL)
- return (ret->rc = PTL_NOSPACE);
+ return (ret->rc = PTL_NO_SPACE);
state_lock(nal, &flags);
new = lib_me_alloc (nal);
if (new == NULL)
- return (ret->rc = PTL_NOSPACE);
+ return (ret->rc = PTL_NO_SPACE);
/* Should check for valid matchid, but not yet */
lib_me_free (nal, new);
state_unlock (nal, &flags);
- return (ret->rc = PTL_INV_ME);
+ return (ret->rc = PTL_ME_INVALID);
}
new->match_id = args->match_id_in;
me = ptl_handle2me(&args->current_in, nal);
if (me == NULL) {
- ret->rc = PTL_INV_ME;
+ ret->rc = PTL_ME_INVALID;
} else {
lib_me_unlink(nal, me);
ret->rc = PTL_OK;
/* call with state_lock please */
void lib_me_unlink(nal_cb_t *nal, lib_me_t *me)
{
- lib_ni_t *ni = &nal->ni;
-
- if (ni->debug & PTL_DEBUG_UNLINK) {
- ptl_handle_any_t handle;
- ptl_me2handle(&handle, me);
- }
-
list_del (&me->me_list);
if (me->md) {
unsigned long flags;
if (args->index_in < 0 || args->index_in >= tbl->size)
- return ret->rc = PTL_INV_PTINDEX;
+ return ret->rc = PTL_PT_INDEX_INVALID;
nal->cb_printf(nal, "Portal table index %d\n", args->index_in);
me = ptl_handle2me(&args->current_in, nal);
if (me == NULL) {
- ret->rc = PTL_INV_ME;
+ ret->rc = PTL_ME_INVALID;
} else {
lib_me_dump(nal, me);
ret->rc = PTL_OK;