Пример #1
0
static int resource_set_release(lua_State *L)
{
    resource_set_lua_t *rset;

    mrp_debug("> release");

    rset = resource_set_lua_check(L, 1);

    if (!rset)
        return luaL_error(L, "internal error");

    if (!rset->committed) {

        /* Committing the resource set here means that the resource set stays
         * in released state but already receives events. */

        if (mrp_application_class_add_resource_set(rset->application_class,
            rset->zone, rset->resource_set, 0) < 0)
            return luaL_error(L, "failed to commit the resource set");

        rset->committed = TRUE;
    }

    mrp_resource_set_release(rset->resource_set, 0);

    return 0;
}
Пример #2
0
void resctl_release(resctl_t *ctl)
{
    if (ctl != NULL && (ctl->granted || ctl->requested)) {
        mrp_log_info("releasing telephony resources");
        mrp_resource_set_release(ctl->set, ctl->seqno++);
        ctl->requested = FALSE;
    }
}
Пример #3
0
static int resource_set_release(lua_State *L)
{
    resource_set_lua_t *rset;

    mrp_debug("> release");

    rset = resource_set_lua_check(L, 1);

    if (!rset)
        return luaL_error(L, "internal error");

    mrp_resource_set_release(rset->resource_set, 0);

    return 1;
}