mirror of
https://gitlab.com/mishakmak/pam-fprint-grosshack.git
synced 2026-04-08 20:03:34 +02:00
Fix _get_error() in the manager
Fix wrong assumption of semantics when fp_discover_devs() returns NULL.
This commit is contained in:
committed by
Daniel Drake
parent
5dafd66eb8
commit
3a0152e124
@ -1 +1,2 @@
|
|||||||
src/main.c
|
src/main.c
|
||||||
|
src/manager.c
|
||||||
|
|||||||
@ -31,6 +31,7 @@ GQuark fprint_error_quark(void);
|
|||||||
/* Errors */
|
/* Errors */
|
||||||
#define FPRINT_ERROR fprint_error_quark()
|
#define FPRINT_ERROR fprint_error_quark()
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
FPRINT_ERROR_INTERNAL,
|
||||||
FPRINT_ERROR_DISCOVER_PRINTS,
|
FPRINT_ERROR_DISCOVER_PRINTS,
|
||||||
FPRINT_ERROR_PRINT_NOT_FOUND,
|
FPRINT_ERROR_PRINT_NOT_FOUND,
|
||||||
FPRINT_ERROR_PRINT_LOAD,
|
FPRINT_ERROR_PRINT_LOAD,
|
||||||
|
|||||||
@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
#include <dbus/dbus-glib-bindings.h>
|
#include <dbus/dbus-glib-bindings.h>
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
#include <glib/gi18n.h>
|
||||||
#include <libfprint/fprint.h>
|
#include <libfprint/fprint.h>
|
||||||
#include <glib-object.h>
|
#include <glib-object.h>
|
||||||
|
|
||||||
@ -79,7 +80,8 @@ fprint_manager_init (FprintManager *manager)
|
|||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
if (!discovered_devs) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user