|
From: <mla...@us...> - 2007-12-02 03:50:53
|
Revision: 333
http://g15daemon.svn.sourceforge.net/g15daemon/?rev=333&view=rev
Author: mlampard
Date: 2007-12-01 19:50:57 -0800 (Sat, 01 Dec 2007)
Log Message:
-----------
ensure call to uinput plugin exit function succeeds.
Modified Paths:
--------------
trunk/g15daemon-wip/ChangeLog
trunk/g15daemon-wip/g15daemon/g15_plugins.c
trunk/g15daemon-wip/g15daemon/main.c
Modified: trunk/g15daemon-wip/ChangeLog
===================================================================
--- trunk/g15daemon-wip/ChangeLog 2007-12-02 01:32:29 UTC (rev 332)
+++ trunk/g15daemon-wip/ChangeLog 2007-12-02 03:50:57 UTC (rev 333)
@@ -110,3 +110,6 @@
- Add NAME section to g15daemon_client manpages
- Tweak delay between successive keyboard reads. This reduces cpu load by
50% on my system.
+- Bugfix: Ensure that all plugin exit functions are called on leaving.
+- Bugfix: if keypress event is received (very early in the startup process,
+ the daemon would crash. Check that expected pointers are valid.
Modified: trunk/g15daemon-wip/g15daemon/g15_plugins.c
===================================================================
--- trunk/g15daemon-wip/g15daemon/g15_plugins.c 2007-12-02 01:32:29 UTC (rev 332)
+++ trunk/g15daemon-wip/g15daemon/g15_plugins.c 2007-12-02 03:50:57 UTC (rev 333)
@@ -129,7 +129,7 @@
g15daemon_msleep(info->update_msecs);
}
}else{
- while(1){
+ while(!leaving){
g15daemon_msleep(500);
}
}
Modified: trunk/g15daemon-wip/g15daemon/main.c
===================================================================
--- trunk/g15daemon-wip/g15daemon/main.c 2007-12-02 01:32:29 UTC (rev 332)
+++ trunk/g15daemon-wip/g15daemon/main.c 2007-12-02 03:50:57 UTC (rev 333)
@@ -64,6 +64,10 @@
static unsigned long lastkeys;
if(!(value & cycle_key) && !(lastkeys & cycle_key)){
lcd_t *lcd = (lcd_t*)caller;
+
+ if(!lcd->g15plugin->info)
+ break;
+
int *(*plugin_listener)(plugin_event_t *newevent) = (void*)lcd->g15plugin->info->event_handler;
plugin_event_t *newevent=g15daemon_xmalloc(sizeof(plugin_event_t));
newevent->event = event;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|