void muse_server_set_dispatch_timeout(muse_module_h m, int api, int timeout)
{
muse_return_if_fail(m);
+ muse_return_if_fail(m->idx >= 0 && m->idx < ms_get_instance()->conf->host_cnt);
+ muse_return_if_fail(api >= 0 && api < MUSE_DISPATCHER_MAX);
+
ms_module_set_timeout(m->idx, api, timeout);
}
int muse_server_get_dispatch_timeout(muse_module_h m, int api)
{
- muse_return_val_if_fail(m, MUSE_ERR);
+ muse_return_val_if_fail(m, MM_ERROR_INVALID_ARGUMENT);
+ muse_return_val_if_fail(m->idx >= 0 && m->idx < ms_get_instance()->conf->host_cnt, MM_ERROR_INVALID_ARGUMENT);
+ muse_return_val_if_fail(api >= 0 && api < MUSE_DISPATCHER_MAX, MM_ERROR_INVALID_ARGUMENT);
+
return ms_module_get_timeout(m->idx, api);
}
{
muse_return_val_if_fail(m, MM_ERROR_INVALID_ARGUMENT);
muse_return_val_if_fail(name, MM_ERROR_INVALID_ARGUMENT);
+ muse_return_val_if_fail(m->idx >= 0 && m->idx < ms_get_instance()->conf->host_cnt, MM_ERROR_INVALID_ARGUMENT);
+
ms_module_set_dllsym_value(m->idx, name, GINT_TO_POINTER(value));
return MM_ERROR_NONE;
}
muse_return_val_if_fail(m, MM_ERROR_INVALID_ARGUMENT);
muse_return_val_if_fail(name, MM_ERROR_INVALID_ARGUMENT);
muse_return_val_if_fail(value, MM_ERROR_INVALID_ARGUMENT);
+ muse_return_val_if_fail(m->idx >= 0 && m->idx < ms_get_instance()->conf->host_cnt, MM_ERROR_INVALID_ARGUMENT);
ret = ms_module_get_dllsym_value(m->idx, name, &ptr);
if (ret == MM_ERROR_NONE)