void Gobby::AuthCommands::set_sasl_error(InfXmppConnection* connection, const gchar* message) { GError* error = g_error_new_literal( inf_authentication_detail_error_quark(), INF_AUTHENTICATION_DETAIL_ERROR_AUTHENTICATION_FAILED, message ); inf_xmpp_connection_set_sasl_error(connection, error); g_error_free(error); }
static void infinoted_startup_sasl_callback_set_error(InfXmppConnection* connection, InfAuthenticationDetailError code, const GError* error) { GError* own_error; own_error = NULL; if(!error) { own_error = g_error_new_literal( inf_authentication_detail_error_quark(), code, inf_authentication_detail_strerror(code) ); inf_xmpp_connection_set_sasl_error(connection, own_error); g_error_free(own_error); } else { inf_xmpp_connection_set_sasl_error(connection, error); } }