예제 #1
0
파일: action.c 프로젝트: PutiZL/ironbee
ib_status_t ib_action_register(
    ib_engine_t       *ib,
    const ib_action_t *action
)
{
    assert(ib != NULL);
    assert(action != NULL);

    ib_status_t rc;
    ib_hash_t *action_hash = ib->actions;

    rc = ib_hash_get(action_hash, NULL, action->name);
    if (rc == IB_OK) {
        /* Already exists. */
        return IB_EINVAL;
    }

    rc = ib_hash_set(action_hash, ib_action_name(action), (void *)action);

    return rc;
}
예제 #2
0
파일: action.cpp 프로젝트: B0SB05/ironbee
const char* ConstAction::name() const
{
    return ib_action_name(ib());
}