error = g_error_new (GSIGNOND_DB_ERROR,
code,
- msg);
+ "%s", msg);
return error;
}
* 02110-1301 USA
*/
#include <sqlite3.h>
+#include <string.h>
#include "gsignond/gsignond-log.h"
#include "gsignond-db-error.h"
g_free(plugin_filename);
if (plugin_module == NULL) {
DBG("Plugin couldn't be opened");
- return;
+ return NULL;
}
gchar* plugin_get_type = g_strdup_printf("gsignond_%s_plugin_get_type",
plugin_type);
- GType (*plugin_get_type_f)(void);
+ gpointer p;
+
DBG("Resolving symbol %s", plugin_get_type);
gboolean symfound = g_module_symbol (plugin_module,
- plugin_get_type, &plugin_get_type_f);
+ plugin_get_type, &p);
g_free(plugin_get_type);
g_module_close (plugin_module);
if (!symfound) {
}
DBG("Creating plugin object");
+ GType (*plugin_get_type_f)(void) = p;
GSignondPlugin* plugin = g_object_new(plugin_get_type_f(), NULL);
if (plugin == NULL) {
DBG("Plugin couldn't be created");
}
/**
- * gsignond_db_credentials_database_get_owner:
+ * gsignond_db_credentials_database_get_identity_owner:
*
* @self: instance of #GSignondDbCredentialsDatabase
* @identity_id: the id of the identity whose owner is needed
* gsignond_identity_info_free
*/
GSignondSecurityContext *
-gsignond_db_credentials_database_get_owner (
+gsignond_db_credentials_database_get_identity_owner (
GSignondDbCredentialsDatabase *self,
const guint32 identity_id)
{
gsignond_plugin_error (self, error);
g_error_free(error);
} else {
- gchar* error_message = g_strdup_printf("userActionFinished error: %d",
- query_error);
GError* error = g_error_new(GSIGNOND_ERROR,
GSIGNOND_ERROR_USER_INTERACTION,
- error_message);
+ "userActionFinished error: %d",
+ query_error);
gsignond_plugin_error (self, error);
- g_free(error_message);
g_error_free(error);
}
}
g_object_class_override_property (gobject_class, PROP_TYPE, "type");
g_object_class_override_property (gobject_class, PROP_MECHANISMS,
"mechanisms");
-}
\ No newline at end of file
+}
fail_if (owners == NULL);
gsignond_security_context_list_free (owners);
- owner = gsignond_db_credentials_database_get_owner (
+ owner = gsignond_db_credentials_database_get_identity_owner (
credentials_db, identity_id);
fail_if (owner == NULL);
gsignond_security_context_free (owner);