Commit 3a0152e1 authored by Bastien Nocera's avatar Bastien Nocera Committed by Daniel Drake
Browse files

Fix _get_error() in the manager

Fix wrong assumption of semantics when fp_discover_devs()
returns NULL.
parent 5dafd66e
src/main.c
src/manager.c
......@@ -31,6 +31,7 @@ GQuark fprint_error_quark(void);
/* Errors */
#define FPRINT_ERROR fprint_error_quark()
typedef enum {
FPRINT_ERROR_INTERNAL,
FPRINT_ERROR_DISCOVER_PRINTS,
FPRINT_ERROR_PRINT_NOT_FOUND,
FPRINT_ERROR_PRINT_LOAD,
......
......@@ -19,6 +19,7 @@
#include <dbus/dbus-glib-bindings.h>
#include <glib.h>
#include <glib/gi18n.h>
#include <libfprint/fprint.h>
#include <glib-object.h>
......@@ -79,7 +80,8 @@ fprint_manager_init (FprintManager *manager)
int i = 0;
if (!discovered_devs) {
priv->last_error = g_error_new (0, 0, "NO DEVICES AVAILABLE: FIXME");
priv->last_error = g_error_new (FPRINT_ERROR, FPRINT_ERROR_INTERNAL,
_("An internal error occurred in libfprint"));
return;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment