From 38fa2720cf4cb7af59bef60ced5213ac3a8e0d7f Mon Sep 17 00:00:00 2001 From: mmdolze Date: Thu, 14 May 2009 06:15:59 +0000 Subject: [PATCH] Fix handling of named priorities. Any name not in the list of priorities made the screen get hidden. Now the server returns an error message. Discovered by lint(1). --- ChangeLog | 1 + server/screen.c | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 27f3d93..2631592 100644 --- a/ChangeLog +++ b/ChangeLog @@ -69,6 +69,7 @@ v.0.5dev (ongoing development) * Change drivers to start in background by default: bayrad, CFontz, ea65, glk * imon driver: Change hbars to make last char in-/decrease vertically + hd44780 driver: port usblcd connection type from 0.4.5 to 0.5 (M. Dolze) + * server: Fix interpretation of named screen priorities v.0.5.2 * fix switching on/off the Load screen in lcdproc client using the menu diff --git a/server/screen.c b/server/screen.c index 09a2495..c70f500 100644 --- a/server/screen.c +++ b/server/screen.c @@ -214,12 +214,13 @@ screen_find_widget(Screen *s, char *id) /** Convert a priority name to the priority id. * \param priname Name of the screen priority. - * \return Priority id associatited with \c priname. + * \return Priority id associated with \c priname, -1 if no matching priority + * id could be found. */ Priority screen_pri_name_to_pri(char *priname) { - Priority pri = WID_NONE; + Priority pri = -1; int i; for (i = 0; pri_names[i]; i++) {