示例#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());
}