X-Git-Url: https://uglyman.kremlin.cc/gitweb/gitweb.cgi?a=blobdiff_plain;f=src%2Finterfaces%2Fhostnamed%2Fhostnamed.c;h=1ce443e64c8cffbf24b5bfa49197d498f92975c1;hb=15c779beb04802541e6b3ab0475243ca87674b75;hp=114ad10043d138b85cf143b7ad39a86976b9342f;hpb=6de394d4129d558807da8d52bc736494ccfbb387;p=systembsd.git diff --git a/src/interfaces/hostnamed/hostnamed.c b/src/interfaces/hostnamed/hostnamed.c index 114ad10..1ce443e 100644 --- a/src/interfaces/hostnamed/hostnamed.c +++ b/src/interfaces/hostnamed/hostnamed.c @@ -1,8 +1,7 @@ #include -#include "hostnamed.h" -GDBusNodeInfo *spect_data; GMainLoop *loop; +GDBusNodeInfo *spect_data; static void handle_method_call(GDBusConnection *conn, const gchar *sender, @@ -13,11 +12,13 @@ static void handle_method_call(GDBusConnection *conn, GDBusMethodInvocation *invc, gpointer usrdat) { - g_printf("%s wants to call %s, at %s with interface %s\n", sender, method_name, obj_path, interf_name); + //g_printf("%s wants to call %s, at %s with interface %s\n", sender, method_name, obj_path, interf_name); - GString *xml_ret; - GVariant *xml_ret_gvar; + if(g_strcmp0(method_name, "Introspect" + GVariant *xml_ret_gvar; + GString *xml_ret; + g_dbus_interface_info_generate_xml(spect_data->interfaces[0], (guint)0, xml_ret); xml_ret_gvar = g_variant_new_string(xml_ret->str); g_dbus_method_invocation_return_value(invc, xml_ret_gvar); @@ -84,7 +85,6 @@ static void on_bus_acquired(GDBusConnection *conn, NULL, NULL, NULL); - g_assert(reg_id > 0); } static void on_name_acquired(GDBusConnection *conn, @@ -99,6 +99,7 @@ static void on_name_lost(GDBusConnection *conn, gpointer user_data) { g_print("lost name %s, exiting...\n", name); + //g_print("you might need to run hacks/punch_config.sh\n"); g_main_loop_quit(loop); }