aboutsummaryrefslogtreecommitdiff
path: root/hardinfo2/util.c
diff options
context:
space:
mode:
authorLeandro A. F. Pereira <leandro@hardinfo.org>2009-04-29 22:16:47 -0300
committerLeandro A. F. Pereira <leandro@hardinfo.org>2009-04-29 22:16:47 -0300
commit64f6c0ba3c0f8a7d67d813cb3498987134477d83 (patch)
tree0b3a6bbb709852e6863bf25c9fb49e686980699b /hardinfo2/util.c
parent20731a3f2e262440e00da501452b1efe5e6f1d52 (diff)
Implement more remote client features
Diffstat (limited to 'hardinfo2/util.c')
-rw-r--r--hardinfo2/util.c11
1 files changed, 6 insertions, 5 deletions
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;