コード例 #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());
}