diff options
Diffstat (limited to 'binding-wifi/agent.c')
-rw-r--r-- | binding-wifi/agent.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/binding-wifi/agent.c b/binding-wifi/agent.c index 6b0f235..492b53f 100644 --- a/binding-wifi/agent.c +++ b/binding-wifi/agent.c @@ -52,7 +52,7 @@ static void handle_method_call(GDBusConnection *connection, const gchar *sender, //MyObject *myobj = user_data; if (g_strcmp0(method_name, "RequestInput") == 0) { - DEBUG(afbitf,"RequestInput method on Agent interface has been called\n"); + AFB_DEBUG("RequestInput method on Agent interface has been called\n"); invocation_passkey = invocation; @@ -79,25 +79,25 @@ static void handle_method_call(GDBusConnection *connection, const gchar *sender, ) ] */ - NOTICE(afbitf,"Passphrase requested for network : %s\n", object_path); + AFB_NOTICE("Passphrase requested for network : %s\n", object_path); (*password_callback)(0, object_path); } if (g_strcmp0(method_name, "ReportError") == 0) { - ERROR(afbitf,"ReportError method on Agent interface has een called\n"); + AFB_ERROR("ReportError method on Agent interface has een called\n"); gchar *error_string; // = NULL; gchar * object_path; g_variant_get(parameters, "(os)", &object_path, &error_string); - ERROR(afbitf, "Error %s for %s\n", error_string, object_path); + AFB_ERROR("Error %s for %s\n", error_string, object_path); if (g_strcmp0(error_string, "invalid-key") == 0) { - WARNING(afbitf, "Passkey is not correct.\n"); + AFB_WARNING( "Passkey is not correct.\n"); (*password_callback)(1, "invalid-key"); } @@ -110,7 +110,7 @@ GError* sendPasskey(gchar *passkey) { GVariantBuilder *builder; GVariant *value = NULL; - NOTICE(afbitf, "Passkey to send: %s\n", passkey); + AFB_NOTICE("Passkey to send: %s\n", passkey); builder = g_variant_builder_new(G_VARIANT_TYPE("a{sv}")); @@ -158,7 +158,7 @@ static void test_signal_handler (GDBusConnection *connection, const gchar *sende else if (g_strcmp0(signal_name, "BSSAdded") == 0) { (*wifiListChanged_callback)(2, "BSSAdded"); } - else WARNING(afbitf,"unhandled signal %s %s %s, %s", sender_name, object_path, interface_name, signal_name); + else AFB_WARNING("unhandled signal %s %s %s, %s", sender_name, object_path, interface_name, signal_name); } @@ -217,8 +217,8 @@ GError* create_agent(GDBusConnection *connection) { err = pthread_create((&tid[0]), NULL, register_agent, NULL); if (err != 0) { - ERROR(afbitf,"\ncan't create thread :[%d]", err); - ERROR(afbitf,"Fatal error!\n\n"); + AFB_ERROR("\ncan't create thread :[%d]", err); + AFB_ERROR("Fatal error!\n\n"); return NULL; } @@ -237,12 +237,12 @@ GError* create_agent(GDBusConnection *connection) { DBUS_REPLY_TIMEOUT, NULL, &error); if (error) { - ERROR(afbitf,"error: %d:%s\n", error->code, error->message); + AFB_ERROR("error: %d:%s\n", error->code, error->message); return error; } else { - INFO(afbitf,"Agent registered\n"); + AFB_INFO("Agent registered\n"); return NULL; } @@ -267,11 +267,11 @@ GError* stop_agent(GDBusConnection *connection) { DBUS_REPLY_TIMEOUT, NULL, &error); if (error) { - ERROR(afbitf, "error: %d:%s\n", error->code, error->message); + AFB_ERROR("error: %d:%s\n", error->code, error->message); return error; } else { - DEBUG(afbitf,"Agent unregistered\n"); + AFB_DEBUG("Agent unregistered\n"); return NULL; } |