From 64f6c0ba3c0f8a7d67d813cb3498987134477d83 Mon Sep 17 00:00:00 2001 From: "Leandro A. F. Pereira" Date: Wed, 29 Apr 2009 22:16:47 -0300 Subject: Implement more remote client features --- hardinfo2/util.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'hardinfo2/util.c') diff --git a/hardinfo2/util.c b/hardinfo2/util.c index 723077cf..27e44943 100644 --- a/hardinfo2/util.c +++ b/hardinfo2/util.c @@ -407,12 +407,14 @@ void parameters_init(int *argc, char ***argv, ProgramParameters * param) .arg = G_OPTION_ARG_NONE, .arg_data = &autoload_deps, .description = "automatically load module dependencies"}, +#ifdef HAS_LIBSOUP { .long_name = "xmlrpc-server", .short_name = 'x', .arg = G_OPTION_ARG_NONE, .arg_data = &run_xmlrpc_server, .description = "run in XML-RPC server mode"}, +#endif /* HAS_LIBSOUP */ { .long_name = "version", .short_name = 'v', @@ -1112,7 +1114,6 @@ void module_entry_scan(ShellModuleEntry * module_entry) gchar *module_entry_get_field(ShellModuleEntry * module_entry, gchar * field) { if (module_entry->fieldfunc) { - DEBUG("field=%s, entry=%s", field, module_entry->name); return module_entry->fieldfunc(field); } @@ -1122,16 +1123,16 @@ gchar *module_entry_get_field(ShellModuleEntry * module_entry, gchar * field) gchar *module_entry_function(ShellModuleEntry * module_entry) { if (module_entry->func) { - return g_strdup(module_entry->func()); + return module_entry->func(); } - return g_strdup("[Error]\n" "Invalid module="); + return NULL; } -gchar *module_entry_get_moreinfo(ShellModuleEntry * module_entry) +gchar *module_entry_get_moreinfo(ShellModuleEntry * module_entry, gchar * field) { if (module_entry->morefunc) { - return g_strdup(module_entry->morefunc(module_entry->name)); + return module_entry->morefunc(field); } return NULL; -- cgit v1.2.3