コード例 #1
0
static int handle_modlist(int fd, int argc, char *argv[])
{
	if (argc != 2)
		return RESULT_SHOWUSAGE;
	ast_mutex_lock(&climodentrylock);
	climodentryfd = fd;
	ast_cli(fd, MODLIST_FORMAT2, "Module", "Description", "Use Count");
	ast_update_module_list(modlist_modentry);
	climodentryfd = -1;
	ast_mutex_unlock(&climodentrylock);
	return RESULT_SUCCESS;
}
コード例 #2
0
ファイル: agent.c プロジェクト: xhook/asterisk-v11
static u_char *ast_var_Modules(struct variable *vp, oid *name, size_t *length,
							  int exact, size_t *var_len, WriteMethod **write_method)
{
	static unsigned long long_ret;

	if (header_generic(vp, name, length, exact, var_len, write_method))
		return NULL;

	if (vp->magic != ASTMODCOUNT)
		return NULL;

	long_ret = ast_update_module_list(countmodule, NULL);

	return (u_char *)&long_ret;
}
コード例 #3
0
static int mod_update(void)
{
	char *module= NULL;
	/* Update the mod stuff */
	if (GTK_CLIST(modules)->selection) {
		module= (char *)gtk_clist_get_row_data(GTK_CLIST(modules), (int) GTK_CLIST(modules)->selection->data);
	}
	gtk_clist_freeze(GTK_CLIST(modules));
	gtk_clist_clear(GTK_CLIST(modules));
	ast_update_module_list(add_mod, NULL);
	if (module)
		gtk_clist_select_row(GTK_CLIST(modules), gtk_clist_find_row_from_data(GTK_CLIST(modules), module), -1);
	gtk_clist_thaw(GTK_CLIST(modules));
	return 1;
}