|
From: <mla...@us...> - 2007-11-30 06:04:39
|
Revision: 330
http://g15daemon.svn.sourceforge.net/g15daemon/?rev=330&view=rev
Author: mlampard
Date: 2007-11-29 22:04:45 -0800 (Thu, 29 Nov 2007)
Log Message:
-----------
tweak keyboard reads to reduce the number of cpu wakeups per second. It's still a bit excessive @ 350/sec but better than 800.
Modified Paths:
--------------
trunk/g15daemon-wip/ChangeLog
trunk/g15daemon-wip/g15daemon/main.c
Modified: trunk/g15daemon-wip/ChangeLog
===================================================================
--- trunk/g15daemon-wip/ChangeLog 2007-11-30 05:15:06 UTC (rev 329)
+++ trunk/g15daemon-wip/ChangeLog 2007-11-30 06:04:45 UTC (rev 330)
@@ -108,3 +108,5 @@
- Use pause() instead of sleeping
- create leaving var as volatile.
- Add NAME section to g15daemon_client manpages
+- Tweak delay between successive keyboard reads. This reduces cpu load by
+ 50% on my system.
Modified: trunk/g15daemon-wip/g15daemon/main.c
===================================================================
--- trunk/g15daemon-wip/g15daemon/main.c 2007-11-30 05:15:06 UTC (rev 329)
+++ trunk/g15daemon-wip/g15daemon/main.c 2007-11-30 06:04:45 UTC (rev 330)
@@ -174,13 +174,13 @@
while (!leaving) {
pthread_mutex_lock(&g15lib_mutex);
- retval = getPressedKeys(&keypresses, 40);
+ retval = getPressedKeys(&keypresses, 20);
pthread_mutex_unlock(&g15lib_mutex);
/* every 2nd packet contains the codes we want.. immediately try again */
while (retval == G15_ERROR_TRY_AGAIN){
pthread_mutex_lock(&g15lib_mutex);
- retval = getPressedKeys(&keypresses, 40);
+ retval = getPressedKeys(&keypresses, 20);
pthread_mutex_unlock(&g15lib_mutex);
}
@@ -197,7 +197,7 @@
pthread_mutex_unlock(&g15lib_mutex);
}
- g15daemon_msleep(10);
+ g15daemon_msleep(40);
}
return NULL;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
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.
|
|
From: <mla...@us...> - 2007-12-07 14:08:00
|
Revision: 334
http://g15daemon.svn.sourceforge.net/g15daemon/?rev=334&view=rev
Author: mlampard
Date: 2007-12-07 06:08:03 -0800 (Fri, 07 Dec 2007)
Log Message:
-----------
dont compile uinput plugin if required headers are non-existant.
Modified Paths:
--------------
trunk/g15daemon-wip/configure.in
trunk/g15daemon-wip/plugins/Makefile.am
Modified: trunk/g15daemon-wip/configure.in
===================================================================
--- trunk/g15daemon-wip/configure.in 2007-12-02 03:50:57 UTC (rev 333)
+++ trunk/g15daemon-wip/configure.in 2007-12-07 14:08:03 UTC (rev 334)
@@ -32,6 +32,7 @@
#include <linux/input.h>
#endif
])
+
#if HAVE_LINUX_UINPUT_H
dnl check for uinput.h version 2.4 or 2.6 ?
AC_CHECK_MEMBER([struct uinput_user_dev.id],
@@ -42,9 +43,12 @@
#include <linux/uinput.h>
]
)
+ uinput=true
dnl end of uinput version checks
#endif
+AM_CONDITIONAL(UINPUT_INTERFACE_PLUGIN, [test x$uinput = xtrue])
+
case $host_os in
*linux*)
AC_DEFINE([OSTYPE_LINUX], [1],[Target OS is Linux])
Modified: trunk/g15daemon-wip/plugins/Makefile.am
===================================================================
--- trunk/g15daemon-wip/plugins/Makefile.am 2007-12-02 03:50:57 UTC (rev 333)
+++ trunk/g15daemon-wip/plugins/Makefile.am 2007-12-07 14:08:03 UTC (rev 334)
@@ -3,12 +3,15 @@
libdir = @G15DAEMON_PLUGIN_DIR@
AM_CFLAGS = -Wall
-lib_LTLIBRARIES =g15plugin_uinput.la g15plugin_tcpserver.la g15plugin_clock.la
-INCLUDES = -I$(top_builddir)/libg15daemon_client/ -I$(top_builddir)/g15daemon
-
+if UINPUT_INTERFACE_PLUGIN
g15plugin_uinput_la_SOURCES = g15_plugin_uinput.c
g15plugin_uinput_la_LDFLAGS = -avoid-version -module
+input_la = g15plugin_uinput.la
+endif
+lib_LTLIBRARIES = ${input_la} g15plugin_tcpserver.la g15plugin_clock.la
+INCLUDES = -I$(top_builddir)/libg15daemon_client/ -I$(top_builddir)/g15daemon
+
g15plugin_tcpserver_la_SOURCES = g15_plugin_net.c
g15plugin_tcpserver_la_LDFLAGS = -avoid-version -module
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mla...@us...> - 2007-12-20 05:09:00
|
Revision: 347
http://g15daemon.svn.sourceforge.net/g15daemon/?rev=347&view=rev
Author: mlampard
Date: 2007-12-19 21:09:02 -0800 (Wed, 19 Dec 2007)
Log Message:
-----------
update copyright notice
Modified Paths:
--------------
trunk/g15daemon-wip/ChangeLog
trunk/g15daemon-wip/g15daemon/g15_plugins.c
trunk/g15daemon-wip/g15daemon/g15daemon.h
trunk/g15daemon-wip/g15daemon/lcdclient_test.c
trunk/g15daemon-wip/g15daemon/linked_lists.c
trunk/g15daemon-wip/g15daemon/main.c
trunk/g15daemon-wip/g15daemon/utility_funcs.c
trunk/g15daemon-wip/libg15daemon_client/g15daemon_client.h
trunk/g15daemon-wip/libg15daemon_client/g15daemon_net.c
trunk/g15daemon-wip/plugins/g15_plugin_clock.c
trunk/g15daemon-wip/plugins/g15_plugin_net.c
trunk/g15daemon-wip/plugins/g15_plugin_template.c
trunk/g15daemon-wip/plugins/g15_plugin_uinput.c
Modified: trunk/g15daemon-wip/ChangeLog
===================================================================
--- trunk/g15daemon-wip/ChangeLog 2007-12-18 05:44:36 UTC (rev 346)
+++ trunk/g15daemon-wip/ChangeLog 2007-12-20 05:09:02 UTC (rev 347)
@@ -15,7 +15,7 @@
along with g15daemon; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- (c) 2006 Mike Lampard, Philip Lawatsch, and others
+ (c) 2006-2007 Mike Lampard, Philip Lawatsch, and others
$Revision$ - $Date$ $Author$
Modified: trunk/g15daemon-wip/g15daemon/g15_plugins.c
===================================================================
--- trunk/g15daemon-wip/g15daemon/g15_plugins.c 2007-12-18 05:44:36 UTC (rev 346)
+++ trunk/g15daemon-wip/g15daemon/g15_plugins.c 2007-12-20 05:09:02 UTC (rev 347)
@@ -15,7 +15,7 @@
along with g15daemon; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- (c) 2006 Mike Lampard, Philip Lawatsch, and others
+ (c) 2006-2007 Mike Lampard, Philip Lawatsch, and others
$Revision$ - $Date$ $Author$
Modified: trunk/g15daemon-wip/g15daemon/g15daemon.h
===================================================================
--- trunk/g15daemon-wip/g15daemon/g15daemon.h 2007-12-18 05:44:36 UTC (rev 346)
+++ trunk/g15daemon-wip/g15daemon/g15daemon.h 2007-12-20 05:09:02 UTC (rev 347)
@@ -15,7 +15,7 @@
along with g15daemon; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- (c) 2006 Mike Lampard, Philip Lawatsch, and others
+ (c) 2006-2007 Mike Lampard, Philip Lawatsch, and others
$Revision$ - $Date$ $Author$
Modified: trunk/g15daemon-wip/g15daemon/lcdclient_test.c
===================================================================
--- trunk/g15daemon-wip/g15daemon/lcdclient_test.c 2007-12-18 05:44:36 UTC (rev 346)
+++ trunk/g15daemon-wip/g15daemon/lcdclient_test.c 2007-12-20 05:09:02 UTC (rev 347)
@@ -15,7 +15,7 @@
along with g15daemon; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- (c) 2006 Mike Lampard, Philip Lawatsch, and others
+ (c) 2006-2007 Mike Lampard, Philip Lawatsch, and others
$Revision$ - $Date$ $Author$
Modified: trunk/g15daemon-wip/g15daemon/linked_lists.c
===================================================================
--- trunk/g15daemon-wip/g15daemon/linked_lists.c 2007-12-18 05:44:36 UTC (rev 346)
+++ trunk/g15daemon-wip/g15daemon/linked_lists.c 2007-12-20 05:09:02 UTC (rev 347)
@@ -15,7 +15,7 @@
along with g15daemon; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- (c) 2006 Mike Lampard, Philip Lawatsch, and others
+ (c) 2006-2007 Mike Lampard, Philip Lawatsch, and others
$Revision$ - $Date$ $Author$
Modified: trunk/g15daemon-wip/g15daemon/main.c
===================================================================
--- trunk/g15daemon-wip/g15daemon/main.c 2007-12-18 05:44:36 UTC (rev 346)
+++ trunk/g15daemon-wip/g15daemon/main.c 2007-12-20 05:09:02 UTC (rev 347)
@@ -15,7 +15,7 @@
along with g15daemon; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- (c) 2006 Mike Lampard, Philip Lawatsch, and others
+ (c) 2006-2007 Mike Lampard, Philip Lawatsch, and others
$Revision$ - $Date$ $Author$
Modified: trunk/g15daemon-wip/g15daemon/utility_funcs.c
===================================================================
--- trunk/g15daemon-wip/g15daemon/utility_funcs.c 2007-12-18 05:44:36 UTC (rev 346)
+++ trunk/g15daemon-wip/g15daemon/utility_funcs.c 2007-12-20 05:09:02 UTC (rev 347)
@@ -15,7 +15,7 @@
along with g15daemon; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- (c) 2006 Mike Lampard, Philip Lawatsch, and others
+ (c) 2006-2007 Mike Lampard, Philip Lawatsch, and others
$Revision$ - $Date$ $Author$
Modified: trunk/g15daemon-wip/libg15daemon_client/g15daemon_client.h
===================================================================
--- trunk/g15daemon-wip/libg15daemon_client/g15daemon_client.h 2007-12-18 05:44:36 UTC (rev 346)
+++ trunk/g15daemon-wip/libg15daemon_client/g15daemon_client.h 2007-12-20 05:09:02 UTC (rev 347)
@@ -15,7 +15,7 @@
along with g15daemon; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- (c) 2006 Mike Lampard, Philip Lawatsch, and others
+ (c) 2006-2007 Mike Lampard, Philip Lawatsch, and others
$Revision$ - $Date$ $Author$
Modified: trunk/g15daemon-wip/libg15daemon_client/g15daemon_net.c
===================================================================
--- trunk/g15daemon-wip/libg15daemon_client/g15daemon_net.c 2007-12-18 05:44:36 UTC (rev 346)
+++ trunk/g15daemon-wip/libg15daemon_client/g15daemon_net.c 2007-12-20 05:09:02 UTC (rev 347)
@@ -15,7 +15,7 @@
along with g15daemon; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- (c) 2006 Mike Lampard, Philip Lawatsch, and others
+ (c) 2006-2007 Mike Lampard, Philip Lawatsch, and others
$Revision$ - $Date$ $Author$
Modified: trunk/g15daemon-wip/plugins/g15_plugin_clock.c
===================================================================
--- trunk/g15daemon-wip/plugins/g15_plugin_clock.c 2007-12-18 05:44:36 UTC (rev 346)
+++ trunk/g15daemon-wip/plugins/g15_plugin_clock.c 2007-12-20 05:09:02 UTC (rev 347)
@@ -15,7 +15,7 @@
along with g15daemon; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- (c) 2006 Mike Lampard, Philip Lawatsch, and others
+ (c) 2006-2007 Mike Lampard, Philip Lawatsch, and others
$Revision$ - $Date$ $Author$
Modified: trunk/g15daemon-wip/plugins/g15_plugin_net.c
===================================================================
--- trunk/g15daemon-wip/plugins/g15_plugin_net.c 2007-12-18 05:44:36 UTC (rev 346)
+++ trunk/g15daemon-wip/plugins/g15_plugin_net.c 2007-12-20 05:09:02 UTC (rev 347)
@@ -15,7 +15,7 @@
along with g15daemon; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- (c) 2006 Mike Lampard, Philip Lawatsch, and others
+ (c) 2006-2007 Mike Lampard, Philip Lawatsch, and others
$Revision$ - $Date$ $Author$
Modified: trunk/g15daemon-wip/plugins/g15_plugin_template.c
===================================================================
--- trunk/g15daemon-wip/plugins/g15_plugin_template.c 2007-12-18 05:44:36 UTC (rev 346)
+++ trunk/g15daemon-wip/plugins/g15_plugin_template.c 2007-12-20 05:09:02 UTC (rev 347)
@@ -15,7 +15,7 @@
along with g15daemon; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- (c) 2006 Mike Lampard, Philip Lawatsch, and others
+ (c) 2006-2007 Mike Lampard, Philip Lawatsch, and others
$Revision$ - $Date$ $Author$
Modified: trunk/g15daemon-wip/plugins/g15_plugin_uinput.c
===================================================================
--- trunk/g15daemon-wip/plugins/g15_plugin_uinput.c 2007-12-18 05:44:36 UTC (rev 346)
+++ trunk/g15daemon-wip/plugins/g15_plugin_uinput.c 2007-12-20 05:09:02 UTC (rev 347)
@@ -15,7 +15,7 @@
along with g15daemon; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- (c) 2006 Mike Lampard, Philip Lawatsch, and others
+ (c) 2006-2007 Mike Lampard, Philip Lawatsch, and others
$Revision$ - $Date$ $Author$
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mla...@us...> - 2007-12-23 08:38:11
|
Revision: 351
http://g15daemon.svn.sourceforge.net/g15daemon/?rev=351&view=rev
Author: mlampard
Date: 2007-12-23 00:38:16 -0800 (Sun, 23 Dec 2007)
Log Message:
-----------
Prepare for new release of g15daemon-wip
Modified Paths:
--------------
trunk/g15daemon-wip/ChangeLog
trunk/g15daemon-wip/configure.in
trunk/g15daemon-wip/rpm/g15daemon.spec
Modified: trunk/g15daemon-wip/ChangeLog
===================================================================
--- trunk/g15daemon-wip/ChangeLog 2007-12-23 08:24:53 UTC (rev 350)
+++ trunk/g15daemon-wip/ChangeLog 2007-12-23 08:38:16 UTC (rev 351)
@@ -103,7 +103,7 @@
- Security: repair some potential security holes.
- Bugfix: Backlight status was being mis-applied when cycling screens.
- Bugfix: Language bindings were not being distributed.
-1.9.1->SVN
+1.9.2
- Add exitfunc to net plugin for exit notification.
- Use pause() instead of sleeping
- create leaving var as volatile.
@@ -116,3 +116,4 @@
- Bugfix: Dont attempt compilation of uinput plugin if headers are
unavailable.
- Bugfix: Write a blank buffer to the LCD before exiting.
+1.9.2->SVN:
Modified: trunk/g15daemon-wip/configure.in
===================================================================
--- trunk/g15daemon-wip/configure.in 2007-12-23 08:24:53 UTC (rev 350)
+++ trunk/g15daemon-wip/configure.in 2007-12-23 08:38:16 UTC (rev 351)
@@ -4,7 +4,7 @@
AC_PREREQ(2.59)
-AC_INIT(g15daemon, [1.9.1], [mla...@us...])
+AC_INIT(g15daemon, [1.9.2], [mla...@us...])
AC_PREFIX_DEFAULT(/usr)
AC_CONFIG_AUX_DIR(config)
AC_CANONICAL_TARGET()
Modified: trunk/g15daemon-wip/rpm/g15daemon.spec
===================================================================
--- trunk/g15daemon-wip/rpm/g15daemon.spec 2007-12-23 08:24:53 UTC (rev 350)
+++ trunk/g15daemon-wip/rpm/g15daemon.spec 2007-12-23 08:38:16 UTC (rev 351)
@@ -3,7 +3,7 @@
%define prefix /usr
Summary: Daemon to control logitech G15 keyboards
Name: g15daemon
-Version: 1.9.1
+Version: 1.9.2
Release: 1
Copyright: GPL
Group: Applications/System
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mla...@us...> - 2007-12-26 09:06:07
|
Revision: 357
http://g15daemon.svn.sourceforge.net/g15daemon/?rev=357&view=rev
Author: mlampard
Date: 2007-12-26 01:06:11 -0800 (Wed, 26 Dec 2007)
Log Message:
-----------
Fix the docs to reflect the transposition of the -s cmdline switch
Modified Paths:
--------------
trunk/g15daemon-wip/Documentation/g15daemon.1
trunk/g15daemon-wip/README
trunk/g15daemon-wip/g15daemon/main.c
Modified: trunk/g15daemon-wip/Documentation/g15daemon.1
===================================================================
--- trunk/g15daemon-wip/Documentation/g15daemon.1 2007-12-26 08:55:42 UTC (rev 356)
+++ trunk/g15daemon-wip/Documentation/g15daemon.1 2007-12-26 09:06:11 UTC (rev 357)
@@ -13,7 +13,8 @@
\-v Show version info.
.P
.HP
-\-s By default, g15daemon uses the MR key to switch between client screens. Using this switch on the cmdline alters this, making L1 (the small, round, black button below the LCD) the button to achieve this function.
+\-s By default, g15daemon uses the L1 key to switch between client screens. Using this switch on the cmdline alters this, making
+MR (Macro Record) the button to achieve this function.
.P
.HP
\-k Stop a previously running copy of G15Daemon. For the keys and LCD to work, you'll have to restart the daemon manually.
@@ -31,7 +32,7 @@
or
g15daemon \-s
-to have the L1 key as the client screen switch.
+to have the MR key as the client screen switch.
If all required libraries are installed and in locations known to your operating system, the daemon will slip quietly into the background and a clock will appear on the LCD.
Congratulations! The linux kernel will now output keycodes for all your extra keys.
Modified: trunk/g15daemon-wip/README
===================================================================
--- trunk/g15daemon-wip/README 2007-12-26 08:55:42 UTC (rev 356)
+++ trunk/g15daemon-wip/README 2007-12-26 09:06:11 UTC (rev 357)
@@ -45,7 +45,8 @@
LCD is being used.
[EDIT] As of 30/10/06 svn, the client switch key can be altered
-from MR to L1 by specifying -s on the g15daemon commandline.
+from L1 to MR by specifying -s on the g15daemon commandline. This
+is not recommended.
***
Modified: trunk/g15daemon-wip/g15daemon/main.c
===================================================================
--- trunk/g15daemon-wip/g15daemon/main.c 2007-12-26 08:55:42 UTC (rev 356)
+++ trunk/g15daemon-wip/g15daemon/main.c 2007-12-26 09:06:11 UTC (rev 357)
@@ -329,7 +329,7 @@
printf(", if uppercase -K or -KILL turn off the keyboard backlight on the way out.");
#endif
#endif
- printf("\n -h shows this help\n -s changes the screen-switch key from MR to L1\n -d debug mode - stay in foreground and output all debug messages to STDERR\n -v show version\n -l set default LCD backlight level\n");
+ printf("\n -h shows this help\n -s changes the screen-switch key from L1 to MR (beware)\n -d debug mode - stay in foreground and output all debug messages to STDERR\n -v show version\n -l set default LCD backlight level\n");
exit(0);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mla...@us...> - 2007-12-26 09:18:11
|
Revision: 359
http://g15daemon.svn.sourceforge.net/g15daemon/?rev=359&view=rev
Author: mlampard
Date: 2007-12-26 01:18:11 -0800 (Wed, 26 Dec 2007)
Log Message:
-----------
print cmdline args in debug mode
Modified Paths:
--------------
trunk/g15daemon-wip/ChangeLog
trunk/g15daemon-wip/g15daemon/main.c
Modified: trunk/g15daemon-wip/ChangeLog
===================================================================
--- trunk/g15daemon-wip/ChangeLog 2007-12-26 09:08:00 UTC (rev 358)
+++ trunk/g15daemon-wip/ChangeLog 2007-12-26 09:18:11 UTC (rev 359)
@@ -119,3 +119,4 @@
- Add --lcdlevel cmdline option to allow setting default LCD brightness level
1.9.2->SVN:
- BugFix: The documentation for --switch was inverted. Fix.
+- Print list of commandline args when in debug mode
Modified: trunk/g15daemon-wip/g15daemon/main.c
===================================================================
--- trunk/g15daemon-wip/g15daemon/main.c 2007-12-26 09:08:00 UTC (rev 358)
+++ trunk/g15daemon-wip/g15daemon/main.c 2007-12-26 09:18:11 UTC (rev 359)
@@ -360,8 +360,13 @@
lcdlevel = atoi(argv[i+1]);
}
}
-
}
+ if(g15daemon_debug){
+ fprintf(stderr, "G15Daemon CMDLINE ARGS: ");
+ for(i=1;i<argc;i++)
+ fprintf(stderr, "%s ",argv[i]);
+ fprintf(stderr,"\n");
+ }
if(uf_return_running()>=0) {
g15daemon_log(LOG_ERR,"G15Daemon already running.. Exiting");
exit(0);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mla...@us...> - 2007-12-27 04:24:00
|
Revision: 361
http://g15daemon.svn.sourceforge.net/g15daemon/?rev=361&view=rev
Author: mlampard
Date: 2007-12-26 20:24:05 -0800 (Wed, 26 Dec 2007)
Log Message:
-----------
Revert keyboard delay from previous commit, prepare for 1.9.3.
Modified Paths:
--------------
trunk/g15daemon-wip/ChangeLog
trunk/g15daemon-wip/configure.in
trunk/g15daemon-wip/g15daemon/main.c
trunk/g15daemon-wip/rpm/g15daemon.spec
Modified: trunk/g15daemon-wip/ChangeLog
===================================================================
--- trunk/g15daemon-wip/ChangeLog 2007-12-26 13:39:10 UTC (rev 360)
+++ trunk/g15daemon-wip/ChangeLog 2007-12-27 04:24:05 UTC (rev 361)
@@ -117,6 +117,8 @@
unavailable.
- Bugfix: Write a blank buffer to the LCD before exiting.
- Add --lcdlevel cmdline option to allow setting default LCD brightness level
-1.9.2->SVN:
+1.9.3:
- BugFix: The documentation for --switch was inverted. Fix.
- Print list of commandline args when in debug mode
+- BugFix: The decreased delay caused keypresses to be misread on some
+ machines. REVERT.
Modified: trunk/g15daemon-wip/configure.in
===================================================================
--- trunk/g15daemon-wip/configure.in 2007-12-26 13:39:10 UTC (rev 360)
+++ trunk/g15daemon-wip/configure.in 2007-12-27 04:24:05 UTC (rev 361)
@@ -4,7 +4,7 @@
AC_PREREQ(2.59)
-AC_INIT(g15daemon, [1.9.2], [mla...@us...])
+AC_INIT(g15daemon, [1.9.3], [mla...@us...])
AC_PREFIX_DEFAULT(/usr)
AC_CONFIG_AUX_DIR(config)
AC_CANONICAL_TARGET()
Modified: trunk/g15daemon-wip/g15daemon/main.c
===================================================================
--- trunk/g15daemon-wip/g15daemon/main.c 2007-12-26 13:39:10 UTC (rev 360)
+++ trunk/g15daemon-wip/g15daemon/main.c 2007-12-27 04:24:05 UTC (rev 361)
@@ -179,13 +179,13 @@
while (!leaving) {
pthread_mutex_lock(&g15lib_mutex);
- retval = getPressedKeys(&keypresses, 2);
+ retval = getPressedKeys(&keypresses, 20);
pthread_mutex_unlock(&g15lib_mutex);
/* every 2nd packet contains the codes we want.. immediately try again */
while (retval == G15_ERROR_TRY_AGAIN){
pthread_mutex_lock(&g15lib_mutex);
- retval = getPressedKeys(&keypresses, 2);
+ retval = getPressedKeys(&keypresses, 20);
pthread_mutex_unlock(&g15lib_mutex);
}
Modified: trunk/g15daemon-wip/rpm/g15daemon.spec
===================================================================
--- trunk/g15daemon-wip/rpm/g15daemon.spec 2007-12-26 13:39:10 UTC (rev 360)
+++ trunk/g15daemon-wip/rpm/g15daemon.spec 2007-12-27 04:24:05 UTC (rev 361)
@@ -3,11 +3,11 @@
%define prefix /usr
Summary: Daemon to control logitech G15 keyboards
Name: g15daemon
-Version: 1.9.2
+Version: 1.9.3
Release: 1
Copyright: GPL
Group: Applications/System
-Source: ftp://prdownloads.sf.net/g15daemon-1.9.1.tar.bz2
+Source: ftp://prdownloads.sf.net/g15daemon-1.9.3.tar.bz2
URL: http://g15daemon.sf.net
Distribution: Linux
Vendor: NONE
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mla...@us...> - 2007-12-29 11:42:40
|
Revision: 368
http://g15daemon.svn.sourceforge.net/g15daemon/?rev=368&view=rev
Author: mlampard
Date: 2007-12-29 03:42:45 -0800 (Sat, 29 Dec 2007)
Log Message:
-----------
Fix autoconf bugs re uinput plugin - MacOSX should now compile WIP. Add solaris detection and build modifiers (it might compile, but it won't work at the moment - in progress.)
Modified Paths:
--------------
trunk/g15daemon-wip/ChangeLog
trunk/g15daemon-wip/configure.in
Modified: trunk/g15daemon-wip/ChangeLog
===================================================================
--- trunk/g15daemon-wip/ChangeLog 2007-12-28 06:58:20 UTC (rev 367)
+++ trunk/g15daemon-wip/ChangeLog 2007-12-29 11:42:45 UTC (rev 368)
@@ -124,3 +124,8 @@
machines. REVERT.
1.9.3->SVN:
- Debug: Log warning if keyboard disappears.
+- Bugfix: Fix autoconf autodetect bugs re uinput plugin.
+- Feature: If autodetection of uinput fails, configure now has a
+ --disable-uinput override.
+- Feature: WIP should now _compile_ on Linux, MacOSX, and Solaris. Solaris
+ support is currently in progress.
Modified: trunk/g15daemon-wip/configure.in
===================================================================
--- trunk/g15daemon-wip/configure.in 2007-12-28 06:58:20 UTC (rev 367)
+++ trunk/g15daemon-wip/configure.in 2007-12-29 11:42:45 UTC (rev 368)
@@ -23,17 +23,32 @@
AC_CHECK_LIB([m], [sin])
AC_CHECK_LIB([pthread], [pthread_mutex_init])
+# Checks for typedefs, structures, and compiler characteristics.
+AC_C_CONST
+AC_TYPE_PID_T
+AC_TYPE_SIZE_T
+
+# Checks for library functions.
+AC_PROG_GCC_TRADITIONAL
+AC_FUNC_SELECT_ARGTYPES
+AC_FUNC_STRFTIME
+AC_CHECK_FUNCS([memset select socket strerror])
+
# Checks for header files.
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS([ linux/input.h ])
-AC_CHECK_HEADERS([ linux/uinput.h arpa/inet.h fcntl.h stdlib.h string.h sys/socket.h unistd.h libg15.h], [], [],
+AC_CHECK_HEADERS([ linux/uinput.h arpa/inet.h fcntl.h stdlib.h string.h sys/socket.h unistd.h libg15.h], [have_linux_uinput_h=yes],[],
[#if HAVE_LINUX_INPUT_H
#include <linux/input.h>
#endif
-])
+],,[])
-#if HAVE_LINUX_UINPUT_H
+AC_ARG_ENABLE([--disable-uinput],[ --disable-uinput do not build linux uinput plugin (default: autodetect)])
+
+if test "x$enable_uinput" != "xno"; then
+ if test "x$have_linux_uinput_h" == "xyes"; then
+ #if HAVE_LINUX_UINPUT_H
dnl check for uinput.h version 2.4 or 2.6 ?
AC_CHECK_MEMBER([struct uinput_user_dev.id],
[AC_DEFINE(HAVE_UINPUT_USER_DEV_ID, 1,
@@ -41,13 +56,21 @@
[
#include <linux/input.h>
#include <linux/uinput.h>
- ]
+ ]
)
uinput=true
dnl end of uinput version checks
-#endif
+ AC_MSG_NOTICE([Necessary includes exist: Compiling Uinput Plugin])
+
+ #endif
+ else
+ AC_MSG_NOTICE([Linux Specific Includes Not Found. NOT COMPILING UINPUT PLUGIN.])
+ fi
+else
+ AC_MSG_NOTICE([Linux UINPUT plugin disabled by request.])
+ uinput=false
+fi
-AM_CONDITIONAL(UINPUT_INTERFACE_PLUGIN, [test x$uinput = xtrue])
case $host_os in
*linux*)
@@ -57,12 +80,22 @@
AC_DEFINE([OSTYPE_DARWIN], [1],[Target OS is Darwin])
AC_SUBST(KEXT_LOCATION,["/System/Library/Extensions/"])
install_kext=true
+ uinput=false
;;
+ *solaris*)
+ AC_DEFINE([OSTYPE_SOLARIS], [1],[Target OS is Solaris])
+ AC_SEARCH_LIBS([connect],socket,[],[],[])
+ AC_SEARCH_LIBS([gethostent],nsl,[],[],[])
+ AC_SEARCH_LIBS([inet_aton],resolv,[],[],[])
+ uinput=false
+ ;;
*)
AC_DEFINE([OSTYPE_OTHER], [1],[Target OS is unknown])
+ uinput=false
;;
esac
AM_CONDITIONAL([KEXT_INSTALL], [test x$install_kext = xtrue])
+AM_CONDITIONAL(UINPUT_INTERFACE_PLUGIN, [test x$uinput = xtrue])
CPPFLAGS=$CPPFLAGS_save
CPPFLAGS="$CPPFLAGS "'-DDATADIR="\"$(datadir)\""'
@@ -70,17 +103,6 @@
AC_SUBST(G15DAEMON_PLUGIN_DIR,["$libdir/g15daemon/$PACKAGE_VERSION/plugins"])
CPPFLAGS="$CPPFLAGS "'-DPLUGINDIR=\"$(G15DAEMON_PLUGIN_DIR)\"'
-# Checks for typedefs, structures, and compiler characteristics.
-AC_C_CONST
-AC_TYPE_PID_T
-AC_TYPE_SIZE_T
-
-# Checks for library functions.
-AC_PROG_GCC_TRADITIONAL
-AC_FUNC_SELECT_ARGTYPES
-AC_FUNC_STRFTIME
-AC_CHECK_FUNCS([memset select socket strerror])
-
AC_CONFIG_FILES([Makefile g15daemon/Makefile libg15daemon_client/Makefile plugins/Makefile])
AC_OUTPUT
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mla...@us...> - 2008-01-01 05:59:20
|
Revision: 371
http://g15daemon.svn.sourceforge.net/g15daemon/?rev=371&view=rev
Author: mlampard
Date: 2007-12-31 21:59:21 -0800 (Mon, 31 Dec 2007)
Log Message:
-----------
Add Solaris support. Improve plugin loader robustness. Log build OS and gcc version in debug mode.
Modified Paths:
--------------
trunk/g15daemon-wip/ChangeLog
trunk/g15daemon-wip/Makefile.am
trunk/g15daemon-wip/configure.in
trunk/g15daemon-wip/g15daemon/g15_plugins.c
trunk/g15daemon-wip/g15daemon/main.c
Modified: trunk/g15daemon-wip/ChangeLog
===================================================================
--- trunk/g15daemon-wip/ChangeLog 2008-01-01 02:44:40 UTC (rev 370)
+++ trunk/g15daemon-wip/ChangeLog 2008-01-01 05:59:21 UTC (rev 371)
@@ -127,5 +127,12 @@
- Bugfix: Fix autoconf autodetect bugs re uinput plugin.
- Feature: If autodetection of uinput fails, configure now has a
--disable-uinput override.
-- Feature: WIP should now _compile_ on Linux, MacOSX, and Solaris. Solaris
- support is currently in progress.
+- Feature: WIP should now compile and run on Linux, MacOSX, and Solaris (v10+).
+ Only Linux and Solaris have been tested.
+- Debug: Add more debugging to plugin loader.
+- Debug: Log build date,OS and GCC version.
+- Feature: Plugin loader will now use DEEP_BIND if available, hopefully
+ resolving conflicts on OS's that support it.
+- Feature: Solaris support. Requires some end-user changes to the usb
+ stack at the moment. Documentation coming soon.
+- BugFix: Plugin loader is now much more robust.
Modified: trunk/g15daemon-wip/Makefile.am
===================================================================
--- trunk/g15daemon-wip/Makefile.am 2008-01-01 02:44:40 UTC (rev 370)
+++ trunk/g15daemon-wip/Makefile.am 2008-01-01 05:59:21 UTC (rev 371)
@@ -2,6 +2,7 @@
SUBDIRS = libg15daemon_client g15daemon plugins
INCLUDES = -I$(top_srcdir)/libg15daemon_client -I$(top_srcdir)/g15daemon
+
EXTRA_DIST = debian contrib Documentation lang-bindings patches rpm README.usage FAQ LICENSE images
docdir = $(prefix)/share/doc/$(PACKAGE)-$(VERSION)
Modified: trunk/g15daemon-wip/configure.in
===================================================================
--- trunk/g15daemon-wip/configure.in 2008-01-01 02:44:40 UTC (rev 370)
+++ trunk/g15daemon-wip/configure.in 2008-01-01 05:59:21 UTC (rev 371)
@@ -13,12 +13,11 @@
AM_INIT_AUTOMAKE()
AC_CONFIG_HEADER([config.h])
-
AC_LIBTOOL_DLOPEN
+
# Checks for programs.
AC_PROG_CC
AC_PROG_LIBTOOL
-AC_PROG_RANLIB
# Checks for libraries.
AC_CHECK_LIB([g15], [initLibG15],,AC_MSG_ERROR(["libg15 (or its devel package) not found. please install it"]))
Modified: trunk/g15daemon-wip/g15daemon/g15_plugins.c
===================================================================
--- trunk/g15daemon-wip/g15daemon/g15_plugins.c 2008-01-01 02:44:40 UTC (rev 370)
+++ trunk/g15daemon-wip/g15daemon/g15_plugins.c 2008-01-01 05:59:21 UTC (rev 371)
@@ -52,13 +52,35 @@
void * handle;
char * error;
-
+ static int deepbind = 0;
+
int mode = library==1?RTLD_GLOBAL:RTLD_LOCAL;
+#ifdef RTLD_DEEPBIND
+ mode|=RTLD_DEEPBIND; /* set ordering of symbols so plugin uses its
+ own symbols in preference to ours */
+ if(!deepbind)
+ g15daemon_log(LOG_ERR,"G15Daemon Plugin_Loader - DEEPBIND Flag available. Using it.");
+ deepbind=1;
+#endif
+
+ g15daemon_log(LOG_ERR,"PRELOADING %s",name);
+ /* remove any pending errors */
+ dlerror();
+
+ handle = dlopen (name,RTLD_LAZY | mode | RTLD_NODELETE);
+ dlclose(handle);
+ dlerror();
- handle = dlopen (name,RTLD_NOW | mode);
+ handle = dlopen (name,RTLD_NOW | mode | RTLD_NOLOAD);
+ if(!handle) { /* FIXME: retry once more if load failed */
+ dlerror();
+ g15daemon_log(LOG_ERR, "Initialisation Failed. Retrying..");
+ handle = dlopen (name, RTLD_LAZY | mode );
+ }
+
if ((error = dlerror()) != NULL) {
- g15daemon_log (LOG_ERR, "%s\n", error);
+ g15daemon_log (LOG_ERR, "Plugin_Loader - Error loading %s - %s\n", name, error);
return(NULL);
}
@@ -67,7 +89,12 @@
int g15daemon_dlclose_plugin(void *handle) {
+ char * error;
dlclose(handle);
+ error = dlerror();
+ if(error != NULL)
+ g15daemon_log(LOG_ERR, "Error from dlclose %s\n",error);
+
return 0;
}
@@ -144,15 +171,17 @@
void *handle = plugin_args->plugin_handle;
if(plugin_args->info->plugin_run!=NULL||plugin_args->info->event_handler!=NULL) {
- g15daemon_log(LOG_ERR,"registered plugin \"%s\"",info->name);
+ g15daemon_log(LOG_ERR,"Plugin \"%s\" boot successful.",info->name);
} else {
return NULL;
}
if(plugin_args->type == G15_PLUGIN_LCD_CLIENT){
+ g15daemon_log(LOG_ERR,"Starting plugin \"%s\" in standard mode\n",info->name);
run_lcd_client(plugin_args);
}
else if(plugin_args->type == G15_PLUGIN_CORE_OS_KB||plugin_args->type == G15_PLUGIN_LCD_SERVER) {
+ g15daemon_log(LOG_ERR,"Starting plugin \"%s\" in advanced mode\n",info->name);
run_advanced_client(plugin_args);
}
@@ -173,14 +202,20 @@
pthread_t client_connection;
pthread_attr_t attr;
lcdnode_t *clientnode;
-
+ char *error_str;
+
if((plugin_handle = g15daemon_dlopen_plugin(filename,G15_PLUGIN_NONSHARED))!=NULL) {
plugin_t *plugin_args=malloc(sizeof(plugin_t));
plugin_args->info = dlsym(plugin_handle, "g15plugin_info");
+ g15daemon_log(LOG_INFO, "Booting plugin...");
- dlerror();
+ error_str=dlerror();
+
+ if(error_str!=NULL)
+ g15daemon_log(LOG_ERR,"g15_plugin_load: %s %s\n",filename,error_str);
+
if(!plugin_args->info) { /* if it doesnt have a valid struct, we should just load it as a library... but we dont at the moment FIXME */
- g15daemon_log(LOG_ERR,"%s is not a valid g15daemon plugin\n",filename);
+ g15daemon_log(LOG_ERR,"%s is not a valid g15daemon plugin. Unloading\n",filename);
g15daemon_dlclose_plugin(plugin_handle);
dlerror();
return -1;
@@ -245,13 +280,13 @@
strcpy(pluginname, plugin_directory);
strncat(pluginname,"/",1);
strncat(pluginname,ep->d_name,200);
- g15daemon_log(LOG_INFO, "Loading plugin %s",pluginname);
g15_plugin_load (masterlist, pluginname);
g15daemon_msleep(20);
}
}
(void) closedir (directory);
+ g15daemon_log(LOG_WARNING,"All available plugins loaded.");
}
else
- perror ("Couldn't open the directory");
+ g15daemon_log (LOG_ERR,"Unable to open the directory: %s",plugin_directory);
}
Modified: trunk/g15daemon-wip/g15daemon/main.c
===================================================================
--- trunk/g15daemon-wip/g15daemon/main.c 2008-01-01 02:44:40 UTC (rev 370)
+++ trunk/g15daemon-wip/g15daemon/main.c 2008-01-01 05:59:21 UTC (rev 371)
@@ -176,12 +176,11 @@
unsigned int keypresses = 0;
int retval = 0;
static int lastkeys = 0;
+
while (!leaving) {
-
pthread_mutex_lock(&g15lib_mutex);
retval = getPressedKeys(&keypresses, 20);
pthread_mutex_unlock(&g15lib_mutex);
-
/* every 2nd packet contains the codes we want.. immediately try again */
while (retval == G15_ERROR_TRY_AGAIN){
pthread_mutex_lock(&g15lib_mutex);
@@ -206,10 +205,8 @@
}
pthread_mutex_unlock(&g15lib_mutex);
}
-
g15daemon_msleep(40);
}
-
return NULL;
}
@@ -259,7 +256,6 @@
}
pthread_mutex_unlock(&lcdlist_mutex);
-
g15daemon_msleep(5);
}
return NULL;
@@ -363,10 +359,13 @@
}
}
if(g15daemon_debug){
- fprintf(stderr, "G15Daemon CMDLINE ARGS: ");
- for(i=1;i<argc;i++)
- fprintf(stderr, "%s ",argv[i]);
- fprintf(stderr,"\n");
+ g15daemon_log(LOG_INFO, "G15Daemon %s Build Date: %s",PACKAGE_VERSION,BUILD_DATE);
+ g15daemon_log(LOG_INFO, "Build OS: %s",BUILD_OS_NAME);
+ g15daemon_log(LOG_INFO, "With compiler: %s",COMPILER_VERSION);
+ fprintf(stderr, "G15Daemon CMDLINE ARGS: ");
+ for(i=1;i<argc;i++)
+ fprintf(stderr, "%s ",argv[i]);
+ fprintf(stderr,"\n");
}
if(uf_return_running()>=0) {
g15daemon_log(LOG_ERR,"G15Daemon already running.. Exiting");
@@ -442,19 +441,22 @@
if(!cycle_cmdline_override){
cycle_key = 1==g15daemon_cfg_read_bool(global_cfg,"Use MR as Cycle Key",0)?G15_KEY_MR:G15_KEY_L1;
}
+#ifndef OSTYPE_SOLARIS
/* all other processes/threads should be seteuid nobody */
if(nobody!=NULL) {
seteuid(nobody->pw_uid);
setegid(nobody->pw_gid);
}
+#endif
pthread_mutex_init(&g15lib_mutex, NULL);
pthread_attr_init(&attr);
+
pthread_attr_setstacksize(&attr,512*1024); /* set stack to 512k - dont need 8Mb !! */
-
if (pthread_create(&keyboard_thread, &attr, keyboard_watch_thread, lcdlist) != 0) {
g15daemon_log(LOG_ERR,"Unable to create keyboard listener thread. Exiting");
goto exitnow;
}
+
pthread_attr_setstacksize(&attr,128*1024);
if (pthread_create(&lcd_thread, &attr, lcd_draw_thread, lcdlist) != 0) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mla...@us...> - 2008-01-01 07:45:49
|
Revision: 372
http://g15daemon.svn.sourceforge.net/g15daemon/?rev=372&view=rev
Author: mlampard
Date: 2007-12-31 23:45:49 -0800 (Mon, 31 Dec 2007)
Log Message:
-----------
Add documentation for FreeBSD.
Modified Paths:
--------------
trunk/g15daemon-wip/ChangeLog
Added Paths:
-----------
trunk/g15daemon-wip/README.FreeBSD
trunk/g15daemon-wip/README.Linux
Modified: trunk/g15daemon-wip/ChangeLog
===================================================================
--- trunk/g15daemon-wip/ChangeLog 2008-01-01 05:59:21 UTC (rev 371)
+++ trunk/g15daemon-wip/ChangeLog 2008-01-01 07:45:49 UTC (rev 372)
@@ -136,3 +136,5 @@
- Feature: Solaris support. Requires some end-user changes to the usb
stack at the moment. Documentation coming soon.
- BugFix: Plugin loader is now much more robust.
+- Feature: Add OS specific documentation for Linux and FreeBSD.
+ Compilation and use on FreeBSD is completely untested.
Added: trunk/g15daemon-wip/README.FreeBSD
===================================================================
--- trunk/g15daemon-wip/README.FreeBSD (rev 0)
+++ trunk/g15daemon-wip/README.FreeBSD 2008-01-01 07:45:49 UTC (rev 372)
@@ -0,0 +1,28 @@
+
+
+**** IMPORTANT NOTICE *******************************************************
+*** Please Note: G15Daemon is completely untested on FreeBSD.
+*** Please report success or failure, any additional steps taken
+*** and Operating System version to mla...@us...
+******************************************************************************
+
+In order for G15Daemon to be able to claim the usb device needed for the LCD and extra keys,
+the following _kernel_ configuration changes may be necessary:
+
+First test if ugen is already enabled:
+ - Plug in the keyboard or other supported USB device.
+ - dmesg |grep "ugen"
+ - you should see a line similar to "ugen0: Logitech G15 Keyboard"
+
+If not already enabled:
+
+ For FreeBSD versions 5.4 and below, and version 6.0:
+ Disable uhid
+ Enable ugen
+
+ For FreeBSD versions 5.5, 6.1 and higher:
+ Enable ugen
+
+ Recompile the kernel and reboot.
+
+NetBSD and OpenBSD are not supported at this time due to libusb deficiencies on those platforms.
Property changes on: trunk/g15daemon-wip/README.FreeBSD
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Added: trunk/g15daemon-wip/README.Linux
===================================================================
--- trunk/g15daemon-wip/README.Linux (rev 0)
+++ trunk/g15daemon-wip/README.Linux 2008-01-01 07:45:49 UTC (rev 372)
@@ -0,0 +1,3 @@
+G15Daemon should compile and run just fine with no intervention.
+
+Please read the README and manpages for further info.
Property changes on: trunk/g15daemon-wip/README.Linux
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mla...@us...> - 2008-01-01 11:26:10
|
Revision: 377
http://g15daemon.svn.sourceforge.net/g15daemon/?rev=377&view=rev
Author: mlampard
Date: 2008-01-01 03:26:13 -0800 (Tue, 01 Jan 2008)
Log Message:
-----------
Update Changelog.
Modified Paths:
--------------
trunk/g15daemon-wip/ChangeLog
trunk/g15daemon-wip/README.FreeBSD
trunk/g15daemon-wip/README.Linux
Modified: trunk/g15daemon-wip/ChangeLog
===================================================================
--- trunk/g15daemon-wip/ChangeLog 2008-01-01 11:22:42 UTC (rev 376)
+++ trunk/g15daemon-wip/ChangeLog 2008-01-01 11:26:13 UTC (rev 377)
@@ -123,18 +123,21 @@
- BugFix: The decreased delay caused keypresses to be misread on some
machines. REVERT.
1.9.3->SVN:
-- Debug: Log warning if keyboard disappears.
-- Bugfix: Fix autoconf autodetect bugs re uinput plugin.
+- Debug: Log warning if keyboard disappears.
+- Bugfix: Fix autoconf autodetect bugs re uinput plugin.
- Feature: If autodetection of uinput fails, configure now has a
--disable-uinput override.
- Feature: WIP should now compile and run on Linux, MacOSX, and Solaris (v10+).
Only Linux and Solaris have been tested.
-- Debug: Add more debugging to plugin loader.
-- Debug: Log build date,OS and GCC version.
+- Debug: Add more debugging to plugin loader.
+- Debug: Log build date,OS and GCC version.
- Feature: Plugin loader will now use DEEP_BIND if available, hopefully
- resolving conflicts on OS's that support it.
+ resolving conflicts on OS's that support it.
- Feature: Solaris support. Requires some end-user changes to the usb
- stack at the moment. Documentation coming soon.
-- BugFix: Plugin loader is now much more robust.
+ stack at the moment. Documentation coming soon.
+- BugFix: Plugin loader is now much more robust.
- Feature: Add OS specific documentation for Linux and FreeBSD.
Compilation and use on FreeBSD is completely untested.
+- Feature: Debug verbosity of g15daemon_log is now variable.
+- Feature: Plugin filenames are now cached in g15daemon.conf to allow
+ (manual, at this stage) changing of load-order.
Modified: trunk/g15daemon-wip/README.FreeBSD
===================================================================
--- trunk/g15daemon-wip/README.FreeBSD 2008-01-01 11:22:42 UTC (rev 376)
+++ trunk/g15daemon-wip/README.FreeBSD 2008-01-01 11:26:13 UTC (rev 377)
@@ -1,5 +1,7 @@
+$Revision$
+$Date$
+$Author$
-
**** IMPORTANT NOTICE *******************************************************
*** Please Note: G15Daemon is completely untested on FreeBSD.
*** Please report success or failure, any additional steps taken
Modified: trunk/g15daemon-wip/README.Linux
===================================================================
--- trunk/g15daemon-wip/README.Linux 2008-01-01 11:22:42 UTC (rev 376)
+++ trunk/g15daemon-wip/README.Linux 2008-01-01 11:26:13 UTC (rev 377)
@@ -1,3 +1,7 @@
+$Revision$
+$Date$
+$Author$
+
G15Daemon should compile and run just fine with no intervention.
Please read the README and manpages for further info.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mla...@us...> - 2008-01-01 13:11:04
|
Revision: 381
http://g15daemon.svn.sourceforge.net/g15daemon/?rev=381&view=rev
Author: mlampard
Date: 2008-01-01 05:11:08 -0800 (Tue, 01 Jan 2008)
Log Message:
-----------
update (c) dates.
Modified Paths:
--------------
trunk/g15daemon-wip/ChangeLog
trunk/g15daemon-wip/g15daemon/g15_plugins.c
trunk/g15daemon-wip/g15daemon/g15daemon.h
trunk/g15daemon-wip/g15daemon/lcdclient_test.c
trunk/g15daemon-wip/g15daemon/linked_lists.c
trunk/g15daemon-wip/g15daemon/main.c
trunk/g15daemon-wip/g15daemon/utility_funcs.c
trunk/g15daemon-wip/libg15daemon_client/g15daemon_client.h
trunk/g15daemon-wip/libg15daemon_client/g15daemon_net.c
trunk/g15daemon-wip/plugins/g15_plugin_clock.c
trunk/g15daemon-wip/plugins/g15_plugin_net.c
trunk/g15daemon-wip/plugins/g15_plugin_uinput.c
Modified: trunk/g15daemon-wip/ChangeLog
===================================================================
--- trunk/g15daemon-wip/ChangeLog 2008-01-01 12:15:49 UTC (rev 380)
+++ trunk/g15daemon-wip/ChangeLog 2008-01-01 13:11:08 UTC (rev 381)
@@ -15,7 +15,7 @@
along with g15daemon; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- (c) 2006-2007 Mike Lampard, Philip Lawatsch, and others
+ (c) 2006-2008 Mike Lampard, Philip Lawatsch, and others
$Revision$ - $Date$ $Author$
Modified: trunk/g15daemon-wip/g15daemon/g15_plugins.c
===================================================================
--- trunk/g15daemon-wip/g15daemon/g15_plugins.c 2008-01-01 12:15:49 UTC (rev 380)
+++ trunk/g15daemon-wip/g15daemon/g15_plugins.c 2008-01-01 13:11:08 UTC (rev 381)
@@ -15,7 +15,7 @@
along with g15daemon; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- (c) 2006-2007 Mike Lampard, Philip Lawatsch, and others
+ (c) 2006-2008 Mike Lampard, Philip Lawatsch, and others
$Revision$ - $Date$ $Author$
Modified: trunk/g15daemon-wip/g15daemon/g15daemon.h
===================================================================
--- trunk/g15daemon-wip/g15daemon/g15daemon.h 2008-01-01 12:15:49 UTC (rev 380)
+++ trunk/g15daemon-wip/g15daemon/g15daemon.h 2008-01-01 13:11:08 UTC (rev 381)
@@ -15,7 +15,7 @@
along with g15daemon; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- (c) 2006-2007 Mike Lampard, Philip Lawatsch, and others
+ (c) 2006-2008 Mike Lampard, Philip Lawatsch, and others
$Revision$ - $Date$ $Author$
Modified: trunk/g15daemon-wip/g15daemon/lcdclient_test.c
===================================================================
--- trunk/g15daemon-wip/g15daemon/lcdclient_test.c 2008-01-01 12:15:49 UTC (rev 380)
+++ trunk/g15daemon-wip/g15daemon/lcdclient_test.c 2008-01-01 13:11:08 UTC (rev 381)
@@ -15,7 +15,7 @@
along with g15daemon; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- (c) 2006-2007 Mike Lampard, Philip Lawatsch, and others
+ (c) 2006-2008 Mike Lampard, Philip Lawatsch, and others
$Revision$ - $Date$ $Author$
Modified: trunk/g15daemon-wip/g15daemon/linked_lists.c
===================================================================
--- trunk/g15daemon-wip/g15daemon/linked_lists.c 2008-01-01 12:15:49 UTC (rev 380)
+++ trunk/g15daemon-wip/g15daemon/linked_lists.c 2008-01-01 13:11:08 UTC (rev 381)
@@ -15,7 +15,7 @@
along with g15daemon; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- (c) 2006-2007 Mike Lampard, Philip Lawatsch, and others
+ (c) 2006-2008 Mike Lampard, Philip Lawatsch, and others
$Revision$ - $Date$ $Author$
Modified: trunk/g15daemon-wip/g15daemon/main.c
===================================================================
--- trunk/g15daemon-wip/g15daemon/main.c 2008-01-01 12:15:49 UTC (rev 380)
+++ trunk/g15daemon-wip/g15daemon/main.c 2008-01-01 13:11:08 UTC (rev 381)
@@ -15,7 +15,7 @@
along with g15daemon; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- (c) 2006-2007 Mike Lampard, Philip Lawatsch, and others
+ (c) 2006-2008 Mike Lampard, Philip Lawatsch, and others
$Revision$ - $Date$ $Author$
Modified: trunk/g15daemon-wip/g15daemon/utility_funcs.c
===================================================================
--- trunk/g15daemon-wip/g15daemon/utility_funcs.c 2008-01-01 12:15:49 UTC (rev 380)
+++ trunk/g15daemon-wip/g15daemon/utility_funcs.c 2008-01-01 13:11:08 UTC (rev 381)
@@ -15,7 +15,7 @@
along with g15daemon; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- (c) 2006-2007 Mike Lampard, Philip Lawatsch, and others
+ (c) 2006-2008 Mike Lampard, Philip Lawatsch, and others
$Revision$ - $Date$ $Author$
Modified: trunk/g15daemon-wip/libg15daemon_client/g15daemon_client.h
===================================================================
--- trunk/g15daemon-wip/libg15daemon_client/g15daemon_client.h 2008-01-01 12:15:49 UTC (rev 380)
+++ trunk/g15daemon-wip/libg15daemon_client/g15daemon_client.h 2008-01-01 13:11:08 UTC (rev 381)
@@ -15,7 +15,7 @@
along with g15daemon; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- (c) 2006-2007 Mike Lampard, Philip Lawatsch, and others
+ (c) 2006-2008 Mike Lampard, Philip Lawatsch, and others
$Revision$ - $Date$ $Author$
Modified: trunk/g15daemon-wip/libg15daemon_client/g15daemon_net.c
===================================================================
--- trunk/g15daemon-wip/libg15daemon_client/g15daemon_net.c 2008-01-01 12:15:49 UTC (rev 380)
+++ trunk/g15daemon-wip/libg15daemon_client/g15daemon_net.c 2008-01-01 13:11:08 UTC (rev 381)
@@ -15,7 +15,7 @@
along with g15daemon; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- (c) 2006-2007 Mike Lampard, Philip Lawatsch, and others
+ (c) 2006-2008 Mike Lampard, Philip Lawatsch, and others
$Revision$ - $Date$ $Author$
Modified: trunk/g15daemon-wip/plugins/g15_plugin_clock.c
===================================================================
--- trunk/g15daemon-wip/plugins/g15_plugin_clock.c 2008-01-01 12:15:49 UTC (rev 380)
+++ trunk/g15daemon-wip/plugins/g15_plugin_clock.c 2008-01-01 13:11:08 UTC (rev 381)
@@ -15,7 +15,7 @@
along with g15daemon; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- (c) 2006-2007 Mike Lampard, Philip Lawatsch, and others
+ (c) 2006-2008 Mike Lampard, Philip Lawatsch, and others
$Revision$ - $Date$ $Author$
Modified: trunk/g15daemon-wip/plugins/g15_plugin_net.c
===================================================================
--- trunk/g15daemon-wip/plugins/g15_plugin_net.c 2008-01-01 12:15:49 UTC (rev 380)
+++ trunk/g15daemon-wip/plugins/g15_plugin_net.c 2008-01-01 13:11:08 UTC (rev 381)
@@ -15,7 +15,7 @@
along with g15daemon; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- (c) 2006-2007 Mike Lampard, Philip Lawatsch, and others
+ (c) 2006-2008 Mike Lampard, Philip Lawatsch, and others
$Revision$ - $Date$ $Author$
Modified: trunk/g15daemon-wip/plugins/g15_plugin_uinput.c
===================================================================
--- trunk/g15daemon-wip/plugins/g15_plugin_uinput.c 2008-01-01 12:15:49 UTC (rev 380)
+++ trunk/g15daemon-wip/plugins/g15_plugin_uinput.c 2008-01-01 13:11:08 UTC (rev 381)
@@ -15,7 +15,7 @@
along with g15daemon; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- (c) 2006-2007 Mike Lampard, Philip Lawatsch, and others
+ (c) 2006-2008 Mike Lampard, Philip Lawatsch, and others
$Revision$ - $Date$ $Author$
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mla...@us...> - 2008-01-01 14:34:05
|
Revision: 382
http://g15daemon.svn.sourceforge.net/g15daemon/?rev=382&view=rev
Author: mlampard
Date: 2008-01-01 06:34:02 -0800 (Tue, 01 Jan 2008)
Log Message:
-----------
add our own version of daemon() for those platforms that don't have native support.
Modified Paths:
--------------
trunk/g15daemon-wip/ChangeLog
trunk/g15daemon-wip/configure.in
trunk/g15daemon-wip/g15daemon/main.c
Modified: trunk/g15daemon-wip/ChangeLog
===================================================================
--- trunk/g15daemon-wip/ChangeLog 2008-01-01 13:11:08 UTC (rev 381)
+++ trunk/g15daemon-wip/ChangeLog 2008-01-01 14:34:02 UTC (rev 382)
@@ -141,3 +141,5 @@
- Feature: Debug verbosity of g15daemon_log is now variable.
- Feature: Plugin filenames are now cached in g15daemon.conf to allow
(manual, at this stage) changing of load-order.
+- Portability: Add our own daemon() function if platform doesn't have native
+ support.
Modified: trunk/g15daemon-wip/configure.in
===================================================================
--- trunk/g15daemon-wip/configure.in 2008-01-01 13:11:08 UTC (rev 381)
+++ trunk/g15daemon-wip/configure.in 2008-01-01 14:34:02 UTC (rev 382)
@@ -25,6 +25,8 @@
AC_CHECK_LIB([m], [sin])
AC_CHECK_LIB([pthread], [pthread_mutex_init])
+AC_CHECK_FUNC(daemon,AC_DEFINE(HAVE_DAEMON,1,[Define if daemon() is available]),[])
+
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_PID_T
Modified: trunk/g15daemon-wip/g15daemon/main.c
===================================================================
--- trunk/g15daemon-wip/g15daemon/main.c 2008-01-01 13:11:08 UTC (rev 381)
+++ trunk/g15daemon-wip/g15daemon/main.c 2008-01-01 14:34:02 UTC (rev 382)
@@ -275,7 +275,40 @@
}
}
+#ifndef HAVE_DAEMON
+/* daemon() is not posix compliant, so we roll our own if needed.*/
+int daemon(int nochdir, int noclose) {
+ pid_t pid;
+
+ if(nochdir<1)
+ chdir("/");
+ pid = fork();
+ switch(pid){
+ case -1:
+ printf("Unable to daemonise!\n");
+ return -1;
+ break;
+ case 0: {
+ umask(0);
+ if(setsid()==-1) {
+ perror("setsid");
+ return -1;
+ }
+ if(noclose<1) {
+ freopen( "/dev/null", "r", stdin);
+ freopen( "/dev/null", "w", stdout);
+ freopen( "/dev/null", "w", stderr);
+ }
+ break;
+ }
+ default:
+ _exit(0);
+ }
+ return 0;
+}
+#endif
+
int main (int argc, char *argv[])
{
pid_t daemonpid;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mla...@us...> - 2008-01-02 03:18:23
|
Revision: 389
http://g15daemon.svn.sourceforge.net/g15daemon/?rev=389&view=rev
Author: mlampard
Date: 2008-01-01 19:18:26 -0800 (Tue, 01 Jan 2008)
Log Message:
-----------
remove mutexes on libg15 functions if running on Solaris.
Modified Paths:
--------------
trunk/g15daemon-wip/ChangeLog
trunk/g15daemon-wip/g15daemon/utility_funcs.c
Modified: trunk/g15daemon-wip/ChangeLog
===================================================================
--- trunk/g15daemon-wip/ChangeLog 2008-01-02 02:27:03 UTC (rev 388)
+++ trunk/g15daemon-wip/ChangeLog 2008-01-02 03:18:26 UTC (rev 389)
@@ -144,3 +144,6 @@
- Portability: Add our own daemon() function if platform doesn't have native
support.
- TidyUp: Wrap keyboard read function.
+- TidyUp: Make all plugin-internal functions static.
+- Portability: Remove mutexes on Solaris, as libusb (and therefore libg15)
+ blocks on read.
Modified: trunk/g15daemon-wip/g15daemon/utility_funcs.c
===================================================================
--- trunk/g15daemon-wip/g15daemon/utility_funcs.c 2008-01-02 02:27:03 UTC (rev 388)
+++ trunk/g15daemon-wip/g15daemon/utility_funcs.c 2008-01-02 03:18:26 UTC (rev 389)
@@ -186,18 +186,26 @@
int uf_write_buf_to_g15(lcd_t *lcd)
{
int retval = 0;
+#ifdef OSTYPE_SOLARIS
+ retval = writePixmapToLCD(lcd->buf);
+#else
pthread_mutex_lock(&g15lib_mutex);
retval = writePixmapToLCD(lcd->buf);
pthread_mutex_unlock(&g15lib_mutex);
+#endif
return retval;
}
int uf_read_keypresses(unsigned int *keypresses, unsigned int timeout)
{
int retval=0;
+#ifdef OSTYPE_SOLARIS
+ retval = getPressedKeys(keypresses, timeout);
+#else
pthread_mutex_lock(&g15lib_mutex);
retval = getPressedKeys(keypresses, timeout);
pthread_mutex_unlock(&g15lib_mutex);
+#endif
return retval;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mla...@us...> - 2008-01-02 03:48:29
|
Revision: 390
http://g15daemon.svn.sourceforge.net/g15daemon/?rev=390&view=rev
Author: mlampard
Date: 2008-01-01 19:48:34 -0800 (Tue, 01 Jan 2008)
Log Message:
-----------
make define more specific as other libusb implementations may also block.
Modified Paths:
--------------
trunk/g15daemon-wip/configure.in
trunk/g15daemon-wip/g15daemon/utility_funcs.c
Modified: trunk/g15daemon-wip/configure.in
===================================================================
--- trunk/g15daemon-wip/configure.in 2008-01-02 03:18:26 UTC (rev 389)
+++ trunk/g15daemon-wip/configure.in 2008-01-02 03:48:34 UTC (rev 390)
@@ -76,7 +76,6 @@
uinput=false
fi
-
case $host_os in
*linux*)
AC_DEFINE([OSTYPE_LINUX], [1],[Target OS is Linux])
@@ -97,6 +96,7 @@
AC_SEARCH_LIBS([nanosleep],rt,[],[],[])
AC_MSG_NOTICE([OS is Solaris, using OS specific workarounds])
uinput=false
+ libusb_blocks=true
;;
*)
AC_DEFINE([OSTYPE_OTHER], [1],[Target OS is unknown])
@@ -104,9 +104,15 @@
uinput=false
;;
esac
+
AM_CONDITIONAL([KEXT_INSTALL], [test x$install_kext = xtrue])
AM_CONDITIONAL(UINPUT_INTERFACE_PLUGIN, [test x$uinput = xtrue])
+dnl Some versions of libusb do not honour timeout and block. Suns' version is one of them.
+if test "x$libusb_blocks" == "xtrue"; then
+ AC_DEFINE([LIBUSB_BLOCKS], [1],[Define if libusb implementation blocks on read or write])
+fi
+
G15D_BUILD_CC="`$CC -v 2>&1 | tail -n 1`"
G15D_BUILD_OS="`uname -s -r -m`"
G15D_BUILD_DATE="`date \"+%a %d %b %Y %T\"`"
Modified: trunk/g15daemon-wip/g15daemon/utility_funcs.c
===================================================================
--- trunk/g15daemon-wip/g15daemon/utility_funcs.c 2008-01-02 03:18:26 UTC (rev 389)
+++ trunk/g15daemon-wip/g15daemon/utility_funcs.c 2008-01-02 03:48:34 UTC (rev 390)
@@ -186,7 +186,7 @@
int uf_write_buf_to_g15(lcd_t *lcd)
{
int retval = 0;
-#ifdef OSTYPE_SOLARIS
+#ifdef LIBUSB_BLOCKS
retval = writePixmapToLCD(lcd->buf);
#else
pthread_mutex_lock(&g15lib_mutex);
@@ -199,7 +199,7 @@
int uf_read_keypresses(unsigned int *keypresses, unsigned int timeout)
{
int retval=0;
-#ifdef OSTYPE_SOLARIS
+#ifdef LIBUSB_BLOCKS
retval = getPressedKeys(keypresses, timeout);
#else
pthread_mutex_lock(&g15lib_mutex);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mla...@us...> - 2008-01-02 06:32:42
|
Revision: 391
http://g15daemon.svn.sourceforge.net/g15daemon/?rev=391&view=rev
Author: mlampard
Date: 2008-01-01 22:32:46 -0800 (Tue, 01 Jan 2008)
Log Message:
-----------
use pthread_cond_timedwait() etc to wakeup LCD thread.
Modified Paths:
--------------
trunk/g15daemon-wip/ChangeLog
trunk/g15daemon-wip/g15daemon/g15daemon.h
trunk/g15daemon-wip/g15daemon/main.c
trunk/g15daemon-wip/g15daemon/utility_funcs.c
trunk/g15daemon-wip/plugins/g15_plugin_clock.c
trunk/g15daemon-wip/plugins/g15_plugin_net.c
Modified: trunk/g15daemon-wip/ChangeLog
===================================================================
--- trunk/g15daemon-wip/ChangeLog 2008-01-02 03:48:34 UTC (rev 390)
+++ trunk/g15daemon-wip/ChangeLog 2008-01-02 06:32:46 UTC (rev 391)
@@ -147,3 +147,5 @@
- TidyUp: Make all plugin-internal functions static.
- Portability: Remove mutexes on Solaris, as libusb (and therefore libg15)
blocks on read.
+- Optimisation: Use pthread conditional variable to signal LCD state change.
+ Further reduces unnecessary wakeups.
Modified: trunk/g15daemon-wip/g15daemon/g15daemon.h
===================================================================
--- trunk/g15daemon-wip/g15daemon/g15daemon.h 2008-01-02 03:48:34 UTC (rev 390)
+++ trunk/g15daemon-wip/g15daemon/g15daemon.h 2008-01-02 06:32:46 UTC (rev 391)
@@ -220,6 +220,10 @@
#define SERV_HELO "G15 daemon HELLO"
#ifdef G15DAEMON_BUILD
+void g15daemon_init_refresh();
+void g15daemon_send_refresh(lcd_t *lcd);
+void g15daemon_wait_refresh();
+void g15daemon_quit_refresh();
/* internal g15daemon-only functions */
int uf_write_buf_to_g15(lcd_t *lcd);
int uf_read_keypresses(unsigned int *keypresses, unsigned int timeout);
Modified: trunk/g15daemon-wip/g15daemon/main.c
===================================================================
--- trunk/g15daemon-wip/g15daemon/main.c 2008-01-02 03:48:34 UTC (rev 390)
+++ trunk/g15daemon-wip/g15daemon/main.c 2008-01-02 06:32:46 UTC (rev 391)
@@ -198,7 +198,7 @@
}
if(!leaving) {
masterlist->current->lcd->state_changed=1;
- masterlist->current->lcd->ident=random();
+ g15daemon_send_refresh(masterlist->current->lcd);
}
pthread_mutex_unlock(&g15lib_mutex);
}
@@ -220,10 +220,12 @@
g15daemon_sleep(2);
while (!leaving) {
+ /* wait until a client has updated */
+ g15daemon_wait_refresh();
+
pthread_mutex_lock(&lcdlist_mutex);
-
displaying = masterlist->current->lcd;
-
+
if(displaying->ident != lastlcd){
/* monitor 'fps' - due to the TCP protocol, some frames will be bunched up.
discard excess to reduce load on the bus */
@@ -255,7 +257,6 @@
}
pthread_mutex_unlock(&lcdlist_mutex);
- g15daemon_msleep(5);
}
return NULL;
}
@@ -479,7 +480,9 @@
seteuid(nobody->pw_uid);
setegid(nobody->pw_gid);
}
-#endif
+#endif
+ /* initialise the pthread condition for the LCD thread */
+ g15daemon_init_refresh();
pthread_mutex_init(&g15lib_mutex, NULL);
pthread_attr_init(&attr);
@@ -552,6 +555,7 @@
seteuid(0);
setegid(0);
closelog();
+ g15daemon_quit_refresh();
uf_conf_write(lcdlist,"/etc/g15daemon.conf");
uf_conf_free(lcdlist);
unlink("/var/run/g15daemon.pid");
Modified: trunk/g15daemon-wip/g15daemon/utility_funcs.c
===================================================================
--- trunk/g15daemon-wip/g15daemon/utility_funcs.c 2008-01-02 03:48:34 UTC (rev 390)
+++ trunk/g15daemon-wip/g15daemon/utility_funcs.c 2008-01-02 06:32:46 UTC (rev 391)
@@ -46,9 +46,12 @@
#include <stdarg.h>
extern unsigned int g15daemon_debug;
+extern volatile int leaving;
#define G15DAEMON_PIDFILE "/var/run/g15daemon.pid"
+pthread_cond_t lcd_refresh = PTHREAD_COND_INITIALIZER;
+
/* if no exitfunc or eventhandler, member should be NULL */
const plugin_info_t generic_info[] = {
/* TYPE, name, initfunc, updatefreq, exitfunc, eventhandler */
@@ -71,6 +74,40 @@
return ptr;
}
+
+void g15daemon_init_refresh() {
+ pthread_condattr_t attr;
+ pthread_cond_init(&lcd_refresh, &attr);
+}
+
+void g15daemon_send_refresh(lcd_t *lcd) {
+ lcd->ident=random();
+ pthread_cond_broadcast(&lcd_refresh);
+}
+
+void g15daemon_wait_refresh() {
+ pthread_mutex_t dummy_mutex;
+ struct timespec timeout;
+ int retval;
+ /* Create a dummy mutex which doesn't unlock for sure while waiting. */
+ pthread_mutex_init(&dummy_mutex, NULL);
+ pthread_mutex_lock(&dummy_mutex);
+start:
+ time(&timeout.tv_sec);
+ timeout.tv_sec += 1;
+ timeout.tv_nsec = 0L;
+
+ retval=pthread_cond_timedwait(&lcd_refresh, &dummy_mutex, &timeout);
+ if(!leaving && retval == ETIMEDOUT)
+ goto start;
+ pthread_mutex_unlock(&dummy_mutex);
+ pthread_mutex_destroy(&dummy_mutex);
+}
+
+void g15daemon_quit_refresh() {
+ pthread_cond_destroy(&lcd_refresh);
+}
+
int uf_return_running(){
int fd;
char pidtxt[128];
Modified: trunk/g15daemon-wip/plugins/g15_plugin_clock.c
===================================================================
--- trunk/g15daemon-wip/plugins/g15_plugin_clock.c 2008-01-02 03:48:34 UTC (rev 390)
+++ trunk/g15daemon-wip/plugins/g15_plugin_clock.c 2008-01-02 06:32:46 UTC (rev 391)
@@ -282,7 +282,7 @@
ret = draw_analog(canvas);
memcpy (lcd->buf, canvas->buffer, G15_BUFFER_LEN);
- lcd->ident = random();
+ g15daemon_send_refresh(lcd);
free(canvas);
return G15_PLUGIN_OK;
}
Modified: trunk/g15daemon-wip/plugins/g15_plugin_net.c
===================================================================
--- trunk/g15daemon-wip/plugins/g15_plugin_net.c 2008-01-02 03:48:34 UTC (rev 390)
+++ trunk/g15daemon-wip/plugins/g15_plugin_net.c 2008-01-02 06:32:46 UTC (rev 391)
@@ -267,7 +267,7 @@
pthread_mutex_lock(&lcdlist_mutex);
memset(client_lcd->buf,0,1024);
g15daemon_convert_buf(client_lcd,tmpbuf);
- client_lcd->ident = random();
+ g15daemon_send_refresh(&client_lcd);
pthread_mutex_unlock(&lcdlist_mutex);
}
}
@@ -279,7 +279,7 @@
}
pthread_mutex_lock(&lcdlist_mutex);
memcpy(client_lcd->buf,tmpbuf,sizeof(client_lcd->buf));
- client_lcd->ident = random();
+ g15daemon_send_refresh(&client_lcd);
pthread_mutex_unlock(&lcdlist_mutex);
}
}
@@ -312,7 +312,7 @@
pthread_mutex_lock(&lcdlist_mutex);
memcpy(client_lcd->buf,tmpbuf+header,buflen+header);
- client_lcd->ident = random();
+ g15daemon_send_refresh(&client_lcd);
pthread_mutex_unlock(&lcdlist_mutex);
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mla...@us...> - 2008-01-03 08:08:45
|
Revision: 397
http://g15daemon.svn.sourceforge.net/g15daemon/?rev=397&view=rev
Author: mlampard
Date: 2008-01-03 00:08:51 -0800 (Thu, 03 Jan 2008)
Log Message:
-----------
prepare for release 1.9.4
Modified Paths:
--------------
trunk/g15daemon-wip/ChangeLog
trunk/g15daemon-wip/configure.in
trunk/g15daemon-wip/rpm/g15daemon.spec
Modified: trunk/g15daemon-wip/ChangeLog
===================================================================
--- trunk/g15daemon-wip/ChangeLog 2008-01-03 08:08:03 UTC (rev 396)
+++ trunk/g15daemon-wip/ChangeLog 2008-01-03 08:08:51 UTC (rev 397)
@@ -122,7 +122,7 @@
- Debug: Print list of commandline args when in debug mode
- BugFix: The decreased delay caused keypresses to be misread on some
machines. REVERT.
-1.9.3->SVN:
+1.9.4
- Debug: Log warning if keyboard disappears.
- Bugfix: Fix autoconf autodetect bugs re uinput plugin.
- Feature: If autodetection of uinput fails, configure now has a
Modified: trunk/g15daemon-wip/configure.in
===================================================================
--- trunk/g15daemon-wip/configure.in 2008-01-03 08:08:03 UTC (rev 396)
+++ trunk/g15daemon-wip/configure.in 2008-01-03 08:08:51 UTC (rev 397)
@@ -4,7 +4,7 @@
AC_PREREQ(2.59)
-AC_INIT(g15daemon, [1.9.3], [mla...@us...])
+AC_INIT(g15daemon, [1.9.4], [mla...@us...])
AC_PREFIX_DEFAULT(/usr)
AC_CONFIG_AUX_DIR(config)
AC_CANONICAL_HOST()
Modified: trunk/g15daemon-wip/rpm/g15daemon.spec
===================================================================
--- trunk/g15daemon-wip/rpm/g15daemon.spec 2008-01-03 08:08:03 UTC (rev 396)
+++ trunk/g15daemon-wip/rpm/g15daemon.spec 2008-01-03 08:08:51 UTC (rev 397)
@@ -3,11 +3,11 @@
%define prefix /usr
Summary: Daemon to control logitech G15 keyboards
Name: g15daemon
-Version: 1.9.3
+Version: 1.9.4
Release: 1
Copyright: GPL
Group: Applications/System
-Source: ftp://prdownloads.sf.net/g15daemon-1.9.3.tar.bz2
+Source: ftp://prdownloads.sf.net/g15daemon-1.9.4.tar.bz2
URL: http://g15daemon.sf.net
Distribution: Linux
Vendor: NONE
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mla...@us...> - 2008-01-04 02:59:11
|
Revision: 399
http://g15daemon.svn.sourceforge.net/g15daemon/?rev=399&view=rev
Author: mlampard
Date: 2008-01-03 18:59:13 -0800 (Thu, 03 Jan 2008)
Log Message:
-----------
Add Solaris docs from Matthew McGee.
Modified Paths:
--------------
trunk/g15daemon-wip/AUTHORS
Added Paths:
-----------
trunk/g15daemon-wip/README.Solaris
Modified: trunk/g15daemon-wip/AUTHORS
===================================================================
--- trunk/g15daemon-wip/AUTHORS 2008-01-03 10:47:49 UTC (rev 398)
+++ trunk/g15daemon-wip/AUTHORS 2008-01-04 02:59:13 UTC (rev 399)
@@ -17,3 +17,6 @@
Fabrizio Sestito
- changes required to compile on OS-X
- OS-X kext file
+
+Matthew McGee
+- Solaris Documentation
Added: trunk/g15daemon-wip/README.Solaris
===================================================================
--- trunk/g15daemon-wip/README.Solaris (rev 0)
+++ trunk/g15daemon-wip/README.Solaris 2008-01-04 02:59:13 UTC (rev 399)
@@ -0,0 +1,123 @@
+*************************************************************************************************
+Solaris 10+ support is here as of Jan-1-2008
+
+ G15 Daemon 1.9.4
+ LibG15Render-1.2
+ LibG15-1.2.5
+
+Fully tested on Solaris 10 and and OpenSolaris 11 (Nevada) with G15 Version 1 and G15 Version 2.
+The other keyboards should function but I have not tested them.
+I will be trying to keep up with new versions and providing packages as needed.
+All packages are in SV datastream format.
+You can install them using 'pkgadd -d http://URL to package all'
+*************************************************************************************************
+
+G15 Daemon requires Solaris 10 and later with libusb installed.
+
+SUNWlibusb Sun wrapper library for libusb
+SUNWlibusbS libusb (source)
+SUNWlibusbugen SUN libusb ugen plugin
+SUNWlibusbugenS libusbugen plugin (source)
+
+*************************************************************************************************
+Compiling from source :
+ Note : Compiling code on Opensolaris 11 (Nevada) does not guarantee
+ the binaries will be functional on Solaris 10.
+*************************************************************************************************
+
+If installing from SVN you must have the following packages from http://sunfreeware.com
+installed into /usr/local/bin :
+
+autoconf-2.60-sol10-x86-local
+automake-1.10-sol10-x86-local
+libiconv-1.11-sol10-x86-local
+make-3.81-sol10-x86-local
+perl-5.8.8-sol10-x86-local
+gcc-3.4.6-sol10-x86-local
+libtool-1.5.24-sol10-x86-local
+
+When compiling LibG15 from SVN you may need to set
+LD_LIBRARY_PATH=/lib:/usr/lib:/usr/sfw/lib:/opt/g15/lib
+export LD_LIBRARY_PATH
+
+If installing from a release source package you must fist compile and install
+at least LibG15 1.2.5 and LibG15Render-1.2.
+No other packages are required.
+
+Successfully configure options are as follows :
+./configure --prefix=/opt/g15 'LDFLAGS='-L/usr/sfw/lib -L/opt/g15/lib' \
+'CPPFLAGS=-I/usr/sfw/include -I/opt/g15/include' && gmake && gmake install
+
+*************************************************************************************************
+* The following script can be used to configure the device support to Solaris and Opensolaris.
+* G15Daemon runs as user nobody so we must provide read/write permissions for user nobody
+* or you must run g15daemon with the option : --user root
+*************************************************************************************************
+
+#!/bin/ksh
+exec 2>/dev/null
+echo "Verifying the ugen driver"
+ add_drv -m '* 0666 root sys' -i 'ugen' ugen
+echo "Adding driver support for Logitech G15 V1"
+ /usr/sbin/update_drv -a -m '* 0660 nobody sys' -i '"usb46d,c222"' ugen
+echo "Adding driver support for Logitech G15 V2"
+ /usr/sbin/update_drv -a -m '* 0660 nobody sys' -i '"usb46d,c227"' ugen
+echo "Adding driver support for Logitech G11 V1"
+ /usr/sbin/update_drv -a -m '* 0660 nobody sys' -i '"usb46d,c225"' ugen
+echo "Adding driver support for Logitech Z-10 V1"
+ /usr/sbin/update_drv -a -m '* 0660 nobody sys' -i '"usb46d,0a07"' ugen
+echo "Finished installing device support."
+ touch /reconfigure
+echo "You must reboot to enable ugen in your device tree"
+
+*************************************************************************************************
+The following XML document can be used to integrate G15Daemon into SMF.
+ 1. Save it to a file (Suggested location is /var/svc/manifest/site/g15daemon.xml)
+ 2. verify using 'svccfg validate /path_to_file'
+ 3. import using 'svccfg import /path_to_file'
+ 4. enable using 'svcadm enable g15daemon'
+*************************************************************************************************
+
+<?xml version="1.0"?>
+<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
+
+<service_bundle type='manifest' name='SCIG15daemon:default'>
+<service name='site/g15daemon' type='service' version='1'>
+
+ <create_default_instance enabled='false' />
+
+ <single_instance />
+
+ <dependency name='localfs' grouping='require_all' restart_on='none' type='service'>
+ <service_fmri value='svc:/system/filesystem/local' />
+ </dependency>
+
+ <dependency name='loopback' grouping='require_all' restart_on='none' type='service'>
+ <service_fmri value='svc:/network/loopback' />
+ </dependency>
+
+ <dependency name='device_files' grouping='require_any' restart_on='restart' type='path'>
+ <service_fmri value='file://localhost/dev/usb/46d.c222' />
+ <service_fmri value='file://localhost/dev/usb/46d.c225' />
+ <service_fmri value='file://localhost/dev/usb/46d.c227' />
+ <service_fmri value='file://localhost/dev/usb/46d.0a07' />
+ </dependency>
+
+ <exec_method type='method' name='start' exec='/opt/g15/sbin/g15daemon' timeout_seconds='60'/>
+ <exec_method type='method' name='stop' exec='/opt/g15/sbin/g15daemon -k' timeout_seconds='60' />
+
+ <stability value='Unstable' />
+
+ <template>
+ <common_name><loctext xml:lang='C'>G15daemon</loctext></common_name>
+ <documentation>
+ <manpage title='g15daemon' section='1' manpath='/opt/g15/share/man' />
+ <manpage title='g15daemon_client_devl' section='3' manpath='/opt/g15/share/man' />
+ </documentation>
+ </template>
+</service>
+</service_bundle>
+
+*************************************************************************************************
+Please read the README and manpages for further info.
+*************************************************************************************************
Property changes on: trunk/g15daemon-wip/README.Solaris
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mla...@us...> - 2008-01-04 04:13:53
|
Revision: 401
http://g15daemon.svn.sourceforge.net/g15daemon/?rev=401&view=rev
Author: mlampard
Date: 2008-01-03 20:13:58 -0800 (Thu, 03 Jan 2008)
Log Message:
-----------
readme.solaris includes a script to set permissions for 'nobody'. remove unwanted ifdefs so solaris can fall back to running non-root. Update build prerequisites for solaris.
Modified Paths:
--------------
trunk/g15daemon-wip/README.Solaris
trunk/g15daemon-wip/g15daemon/main.c
Modified: trunk/g15daemon-wip/README.Solaris
===================================================================
--- trunk/g15daemon-wip/README.Solaris 2008-01-04 03:46:26 UTC (rev 400)
+++ trunk/g15daemon-wip/README.Solaris 2008-01-04 04:13:58 UTC (rev 401)
@@ -35,6 +35,7 @@
perl-5.8.8-sol10-x86-local
gcc-3.4.6-sol10-x86-local
libtool-1.5.24-sol10-x86-local
+m4-1.4.7-sol10-x86-local
When compiling LibG15 from SVN you may need to set
LD_LIBRARY_PATH=/lib:/usr/lib:/usr/sfw/lib:/opt/g15/lib
Modified: trunk/g15daemon-wip/g15daemon/main.c
===================================================================
--- trunk/g15daemon-wip/g15daemon/main.c 2008-01-04 03:46:26 UTC (rev 400)
+++ trunk/g15daemon-wip/g15daemon/main.c 2008-01-04 04:13:58 UTC (rev 401)
@@ -479,13 +479,13 @@
if(!cycle_cmdline_override){
cycle_key = 1==g15daemon_cfg_read_bool(global_cfg,"Use MR as Cycle Key",0)?G15_KEY_MR:G15_KEY_L1;
}
-#ifndef OSTYPE_SOLARIS
+
/* all other processes/threads should be seteuid nobody */
if(nobody!=NULL) {
seteuid(nobody->pw_uid);
setegid(nobody->pw_gid);
}
-#endif
+
/* initialise the pthread condition for the LCD thread */
g15daemon_init_refresh();
pthread_mutex_init(&g15lib_mutex, NULL);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mla...@us...> - 2008-01-12 15:16:23
|
Revision: 409
http://g15daemon.svn.sourceforge.net/g15daemon/?rev=409&view=rev
Author: mlampard
Date: 2008-01-12 07:16:26 -0800 (Sat, 12 Jan 2008)
Log Message:
-----------
Add example udev hotplugging scripts to contrib directory.
Modified Paths:
--------------
trunk/g15daemon-wip/ChangeLog
Added Paths:
-----------
trunk/g15daemon-wip/contrib/99-g15daemon.rules
trunk/g15daemon-wip/contrib/g15daemon-hotplug
Modified: trunk/g15daemon-wip/ChangeLog
===================================================================
--- trunk/g15daemon-wip/ChangeLog 2008-01-09 01:37:02 UTC (rev 408)
+++ trunk/g15daemon-wip/ChangeLog 2008-01-12 15:16:26 UTC (rev 409)
@@ -149,3 +149,5 @@
blocks on read.
- Optimisation: Use pthread conditional variable to signal LCD state change.
Further reduces unnecessary wakeups.
+1.9.4->SVN
+- Add example udev helper scripts to contrib directory.
\ No newline at end of file
Added: trunk/g15daemon-wip/contrib/99-g15daemon.rules
===================================================================
--- trunk/g15daemon-wip/contrib/99-g15daemon.rules (rev 0)
+++ trunk/g15daemon-wip/contrib/99-g15daemon.rules 2008-01-12 15:16:26 UTC (rev 409)
@@ -0,0 +1,6 @@
+# G15daemon udev rule to autostart g15daemon on connect
+# belongs in udev rules directory such as /etc/udev/rules.d/
+# and the script g15daemon-hotplug should be in /usr/bin and made
+# executable with chmod +x /usr/bin/g15daemon-hotplug
+
+SYSFS{../name}=="Logitech Logitech Gaming Keyboard", RUN+="/usr/bin/g15daemon-hotplug"
Property changes on: trunk/g15daemon-wip/contrib/99-g15daemon.rules
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Added: trunk/g15daemon-wip/contrib/g15daemon-hotplug
===================================================================
--- trunk/g15daemon-wip/contrib/g15daemon-hotplug (rev 0)
+++ trunk/g15daemon-wip/contrib/g15daemon-hotplug 2008-01-12 15:16:26 UTC (rev 409)
@@ -0,0 +1,19 @@
+#!/bin/bash
+# G15Daemon udev script to start/stop the daemon
+# when device is connected.
+# requires a udev script in the udev rules directory
+# see 99-g15daemon.rules as an example.
+
+case $ACTION in
+ "add")
+ # start g15daemon on keyboard connect
+ sudo g15daemon
+ ;;
+ "remove")
+ # kill g15daemon on keyboard disconnect
+ sudo g15daemon -k
+ ;;
+ *)
+ exit 0
+ ;;
+esac
Property changes on: trunk/g15daemon-wip/contrib/g15daemon-hotplug
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mla...@us...> - 2008-01-13 02:58:55
|
Revision: 410
http://g15daemon.svn.sourceforge.net/g15daemon/?rev=410&view=rev
Author: mlampard
Date: 2008-01-12 18:58:55 -0800 (Sat, 12 Jan 2008)
Log Message:
-----------
Add NEVER_SELECT cmd to client API. Screens using this cmd will always be hidden unless SWITCH_PRIORITY is used.
Modified Paths:
--------------
trunk/g15daemon-wip/ChangeLog
trunk/g15daemon-wip/g15daemon/g15daemon.h
trunk/g15daemon-wip/g15daemon/linked_lists.c
trunk/g15daemon-wip/libg15daemon_client/g15daemon_client.h
trunk/g15daemon-wip/libg15daemon_client/g15daemon_net.c
trunk/g15daemon-wip/plugins/g15_plugin_net.c
Modified: trunk/g15daemon-wip/ChangeLog
===================================================================
--- trunk/g15daemon-wip/ChangeLog 2008-01-12 15:16:26 UTC (rev 409)
+++ trunk/g15daemon-wip/ChangeLog 2008-01-13 02:58:55 UTC (rev 410)
@@ -150,4 +150,6 @@
- Optimisation: Use pthread conditional variable to signal LCD state change.
Further reduces unnecessary wakeups.
1.9.4->SVN
-- Add example udev helper scripts to contrib directory.
\ No newline at end of file
+- Add example udev helper scripts to contrib directory.
+- API: Add NEVER_SELECT cmd to client API to enforce non-display on
+ client-switch. Used by G15Macro if available.
Modified: trunk/g15daemon-wip/g15daemon/g15daemon.h
===================================================================
--- trunk/g15daemon-wip/g15daemon/g15daemon.h 2008-01-12 15:16:26 UTC (rev 409)
+++ trunk/g15daemon-wip/g15daemon/g15daemon.h 2008-01-13 02:58:55 UTC (rev 410)
@@ -46,6 +46,7 @@
#define CLIENT_CMD_GET_KEYSTATE 'k'
#define CLIENT_CMD_SWITCH_PRIORITIES 'p'
+#define CLIENT_CMD_NEVER_SELECT 'n'
#define CLIENT_CMD_IS_FOREGROUND 'v'
#define CLIENT_CMD_IS_USER_SELECTED 'u'
#define CLIENT_CMD_BACKLIGHT 0x80
@@ -176,8 +177,10 @@
unsigned int mkey_state;
unsigned int contrast_state;
unsigned int state_changed;
- /* set to 1 if user manually selected this screen 0 otherwise*/
+ /* set to 1 if user manually selected this screen 0 otherwise */
unsigned int usr_foreground;
+ /* set to 1 if screen is never to be user-selectable */
+ unsigned int never_select;
/* only used for plugins */
plugin_t *g15plugin;
Modified: trunk/g15daemon-wip/g15daemon/linked_lists.c
===================================================================
--- trunk/g15daemon-wip/g15daemon/linked_lists.c 2008-01-12 15:16:26 UTC (rev 409)
+++ trunk/g15daemon-wip/g15daemon/linked_lists.c 2008-01-13 02:58:55 UTC (rev 410)
@@ -116,7 +116,9 @@
/* cycle through connected client displays */
void g15daemon_lcdnode_cycle(g15daemon_t *masterlist)
{
- lcdnode_t *current_screen = masterlist->current;
+ lcdnode_t *current_screen = NULL;
+skip:
+ current_screen = masterlist->current;
g15daemon_send_event(current_screen->lcd, G15_EVENT_VISIBILITY_CHANGED, SCR_HIDDEN);
@@ -140,6 +142,12 @@
} else {
masterlist->current = masterlist->current->prev;
}
+
+ if(masterlist->current->lcd->never_select==1) {
+ pthread_mutex_unlock(&lcdlist_mutex);
+ goto skip;
+ }
+
masterlist->current->last_priority = masterlist->current;
pthread_mutex_unlock(&lcdlist_mutex);
g15daemon_send_event(current_screen->lcd, G15_EVENT_USER_FOREGROUND, 1);
Modified: trunk/g15daemon-wip/libg15daemon_client/g15daemon_client.h
===================================================================
--- trunk/g15daemon-wip/libg15daemon_client/g15daemon_client.h 2008-01-12 15:16:26 UTC (rev 409)
+++ trunk/g15daemon-wip/libg15daemon_client/g15daemon_client.h 2008-01-13 02:58:55 UTC (rev 410)
@@ -50,7 +50,8 @@
#define G15DAEMON_SWITCH_PRIORITIES 'p'
#define G15DAEMON_IS_FOREGROUND 'v'
#define G15DAEMON_IS_USER_SELECTED 'u'
-
+ #define G15DAEMON_NEVER_SELECT 'n'
+
const char *g15daemon_version();
/* open a new connection to the g15daemon. returns an fd to be used with g15_send & g15_recv */
Modified: trunk/g15daemon-wip/libg15daemon_client/g15daemon_net.c
===================================================================
--- trunk/g15daemon-wip/libg15daemon_client/g15daemon_net.c 2008-01-12 15:16:26 UTC (rev 409)
+++ trunk/g15daemon-wip/libg15daemon_client/g15daemon_net.c 2008-01-13 02:58:55 UTC (rev 410)
@@ -217,6 +217,10 @@
packet[0] = (unsigned char)command;
retval = send( sock, packet, 1, MSG_OOB );
break;
+ case G15DAEMON_NEVER_SELECT:
+ packet[0] = (unsigned char)command;
+ retval = send( sock, packet, 1, MSG_OOB );
+ break;
case G15DAEMON_GET_KEYSTATE:{
retval = 0;
unsigned long keystate = 0;
Modified: trunk/g15daemon-wip/plugins/g15_plugin_net.c
===================================================================
--- trunk/g15daemon-wip/plugins/g15_plugin_net.c 2008-01-12 15:16:26 UTC (rev 409)
+++ trunk/g15daemon-wip/plugins/g15_plugin_net.c 2008-01-13 02:58:55 UTC (rev 410)
@@ -69,6 +69,12 @@
g15daemon_send_event(lcdnode,G15_EVENT_REQ_PRIORITY,1);
break;
}
+ case CLIENT_CMD_NEVER_SELECT: { /* client can never be user-selected */
+ pthread_mutex_lock(&lcdlist_mutex);
+ lcdnode->lcd->never_select = 1;
+ pthread_mutex_unlock(&lcdlist_mutex);
+ break;
+ }
case CLIENT_CMD_IS_FOREGROUND: { /* client wants to know if it's currently viewable */
pthread_mutex_lock(&lcdlist_mutex);
memset(msgbuf,0,2);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mla...@us...> - 2008-01-20 04:24:04
|
Revision: 435
http://g15daemon.svn.sourceforge.net/g15daemon/?rev=435&view=rev
Author: mlampard
Date: 2008-01-19 20:24:09 -0800 (Sat, 19 Jan 2008)
Log Message:
-----------
Retrofit backtrace function to libg15daemon_client to aid debugging any segfaults in client apps on Linux.
Modified Paths:
--------------
trunk/g15daemon-wip/ChangeLog
trunk/g15daemon-wip/configure.in
trunk/g15daemon-wip/libg15daemon_client/g15daemon_net.c
Modified: trunk/g15daemon-wip/ChangeLog
===================================================================
--- trunk/g15daemon-wip/ChangeLog 2008-01-19 15:10:11 UTC (rev 434)
+++ trunk/g15daemon-wip/ChangeLog 2008-01-20 04:24:09 UTC (rev 435)
@@ -153,3 +153,5 @@
- Add example udev helper scripts to contrib directory.
- API: Add NEVER_SELECT cmd to client API to enforce non-display on
client-switch. Used by G15Macro if available.
+- Debug: Add segfault handler to libg15daemon_client to aid debugging
+ clients.
Modified: trunk/g15daemon-wip/configure.in
===================================================================
--- trunk/g15daemon-wip/configure.in 2008-01-19 15:10:11 UTC (rev 434)
+++ trunk/g15daemon-wip/configure.in 2008-01-20 04:24:09 UTC (rev 435)
@@ -36,12 +36,13 @@
AC_PROG_GCC_TRADITIONAL
AC_FUNC_SELECT_ARGTYPES
AC_FUNC_STRFTIME
-AC_CHECK_FUNCS([memset select socket strerror])
+AC_CHECK_FUNCS([memset select socket strerror backtrace backtrace_symbols])
# Checks for header files.
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS([ linux/input.h ])
+AC_CHECK_HEADERS([ execinfo.h ])
AC_CHECK_HEADERS([ linux/uinput.h ], [have_linux_uinput_h=yes],[have_linux_uinput_h=],[])
AC_CHECK_HEADERS([ arpa/inet.h fcntl.h stdlib.h string.h sys/socket.h unistd.h libg15.h],,,
[#if HAVE_LINUX_INPUT_H
Modified: trunk/g15daemon-wip/libg15daemon_client/g15daemon_net.c
===================================================================
--- trunk/g15daemon-wip/libg15daemon_client/g15daemon_net.c 2008-01-19 15:10:11 UTC (rev 434)
+++ trunk/g15daemon-wip/libg15daemon_client/g15daemon_net.c 2008-01-20 04:24:09 UTC (rev 435)
@@ -33,6 +33,7 @@
#include <unistd.h>
#include <sys/stat.h>
#include <fcntl.h>
+#include <stdio.h>
#include <config.h>
@@ -51,14 +52,60 @@
return VERSION;
}
+#ifdef HAVE_BACKTRACE
+
+#include <signal.h>
+#ifdef HAVE_EXECINFO_H
+#include <execinfo.h>
+#endif
+#define BACKTRACE_LEN 100
+_Bool segv_init = 0;
+
+/* sighandler function to print backtrace on segfault */
+
+void g15_sighandler(int sig) {
+ int i,nptrs;
+ void *buf[BACKTRACE_LEN];
+ char **btfuncs;
+
+ switch (sig) {
+ case SIGSEGV:
+ #ifdef HAVE_EXECINFO_H
+ fprintf(stderr, "The application caught a Segmentation Fault. Backtrace follows:\n");
+ nptrs = backtrace(buf,BACKTRACE_LEN);
+
+ btfuncs = backtrace_symbols(buf,nptrs);
+ if(btfuncs == NULL)
+ return;
+
+ for(i=0;i<nptrs;i++)
+ fprintf(stderr,"Backtrace: %s\n",btfuncs[i]);
+
+ free(btfuncs);
+ #endif
+ break;
+ }
+}
+#endif
+
int new_g15_screen(int screentype)
{
+ struct sigaction new_sigaction;
int g15screen_fd;
struct sockaddr_in serv_addr;
+ static int sighandler_init=0;
/* raise the priority of our packets */
int tos = 0x6;
char buffer[256];
+ if(sighandler_init==0) {
+#ifdef HAVE_BACKTRACE
+ new_sigaction.sa_handler = g15_sighandler;
+ new_sigaction.sa_flags = 0;
+ sigaction(SIGSEGV,&new_sigaction,NULL);
+#endif
+ sighandler_init=1;
+ }
g15screen_fd = socket(AF_INET, SOCK_STREAM, 0);
if (g15screen_fd < 0)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mla...@us...> - 2008-01-21 10:40:18
|
Revision: 438
http://g15daemon.svn.sourceforge.net/g15daemon/?rev=438&view=rev
Author: mlampard
Date: 2008-01-21 02:40:18 -0800 (Mon, 21 Jan 2008)
Log Message:
-----------
g15daemon 1.9x: add screen capture ability (M1+M3 == screen dump to /tmp/g15daemon-sc-X.pbm).
Modified Paths:
--------------
trunk/g15daemon-wip/ChangeLog
trunk/g15daemon-wip/g15daemon/g15daemon.h
trunk/g15daemon-wip/g15daemon/main.c
trunk/g15daemon-wip/g15daemon/utility_funcs.c
Modified: trunk/g15daemon-wip/ChangeLog
===================================================================
--- trunk/g15daemon-wip/ChangeLog 2008-01-21 01:32:40 UTC (rev 437)
+++ trunk/g15daemon-wip/ChangeLog 2008-01-21 10:40:18 UTC (rev 438)
@@ -155,3 +155,6 @@
client-switch. Used by G15Macro if available.
- Debug: Add segfault handler to libg15daemon_client to aid debugging
clients.
+- Feature: Add screendump ability. Pressing M1+M3 simultaneously will write
+ a pbm format image of the currently displayed screen to
+ /tmp/g15daemon-sc-?.pbm, where ? is an incremental number.
Modified: trunk/g15daemon-wip/g15daemon/g15daemon.h
===================================================================
--- trunk/g15daemon-wip/g15daemon/g15daemon.h 2008-01-21 01:32:40 UTC (rev 437)
+++ trunk/g15daemon-wip/g15daemon/g15daemon.h 2008-01-21 10:40:18 UTC (rev 438)
@@ -227,6 +227,8 @@
void g15daemon_init_refresh();
void g15daemon_quit_refresh();
int uf_write_buf_to_g15(lcd_t *lcd);
+/* write a pbm format file 'filename' with image contained in 'buf' */
+int uf_screendump_pbm(unsigned char *buf,char *filename);
int uf_read_keypresses(unsigned int *keypresses, unsigned int timeout);
/* return the pid of a running copy of g15daemon, else -1 */
int uf_return_running();
Modified: trunk/g15daemon-wip/g15daemon/main.c
===================================================================
--- trunk/g15daemon-wip/g15daemon/main.c 2008-01-21 01:32:40 UTC (rev 437)
+++ trunk/g15daemon-wip/g15daemon/main.c 2008-01-21 10:40:18 UTC (rev 438)
@@ -95,6 +95,14 @@
displaying->backlight_state++;
displaying->backlight_state %= 3; // limit to 0-2 inclusive
}
+ if(value & G15_KEY_M1 && value & G15_KEY_M3) {
+ static int scr_num=0;
+ char filename[128];
+ lcd_t *displaying = lcd->masterlist->current->lcd;
+ sprintf(filename,"/tmp/g15daemon-sc-%i.pbm",scr_num);
+ uf_screendump_pbm(displaying->buf,filename);
+ scr_num++;
+ }
free(newevent);
}else{
/* hacky attempt to double-time the use of L1, if the key is pressed less than half a second, it cycles the screens. If held for longer, the key is sent to the application for use instead */
Modified: trunk/g15daemon-wip/g15daemon/utility_funcs.c
===================================================================
--- trunk/g15daemon-wip/g15daemon/utility_funcs.c 2008-01-21 01:32:40 UTC (rev 437)
+++ trunk/g15daemon-wip/g15daemon/utility_funcs.c 2008-01-21 10:40:18 UTC (rev 438)
@@ -44,6 +44,7 @@
#include "g15daemon.h"
#include <libg15.h>
#include <stdarg.h>
+#include <libg15render.h>
extern unsigned int g15daemon_debug;
extern volatile int leaving;
@@ -659,3 +660,24 @@
return 0;
}
+int uf_screendump_pbm(unsigned char *buffer,char *filename) {
+ FILE *f;
+ int x,y;
+ #define WIDTH 40
+ g15canvas *canvas=g15daemon_xmalloc(sizeof(g15canvas));
+ memcpy(canvas->buffer,buffer,LCD_BUFSIZE);
+ f = fopen(filename,"w+");
+ fprintf(f,"P1\n160 43\n");
+ fprintf(f,"# G15 screendump - %s\n\n",filename);
+ for(y=0;y<43;y++)
+ for(x=0;x<160;x++) {
+ fprintf(f,"%i",g15r_getPixel(canvas,x,y));
+ if(x%WIDTH==WIDTH-1)
+ fprintf(f,"\n");
+ }
+
+ fclose(f);
+ free(canvas);
+ return 0;
+}
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mla...@us...> - 2008-01-22 08:53:25
|
Revision: 439
http://g15daemon.svn.sourceforge.net/g15daemon/?rev=439&view=rev
Author: mlampard
Date: 2008-01-22 00:53:30 -0800 (Tue, 22 Jan 2008)
Log Message:
-----------
g15daemon 1.9x: only wake display thread if signalled from the foreground client thread.
Modified Paths:
--------------
trunk/g15daemon-wip/ChangeLog
trunk/g15daemon-wip/g15daemon/utility_funcs.c
Modified: trunk/g15daemon-wip/ChangeLog
===================================================================
--- trunk/g15daemon-wip/ChangeLog 2008-01-21 10:40:18 UTC (rev 438)
+++ trunk/g15daemon-wip/ChangeLog 2008-01-22 08:53:30 UTC (rev 439)
@@ -158,3 +158,4 @@
- Feature: Add screendump ability. Pressing M1+M3 simultaneously will write
a pbm format image of the currently displayed screen to
/tmp/g15daemon-sc-?.pbm, where ? is an incremental number.
+- BugFix: Only wakeup display thread if LCD buffer is visible.
Modified: trunk/g15daemon-wip/g15daemon/utility_funcs.c
===================================================================
--- trunk/g15daemon-wip/g15daemon/utility_funcs.c 2008-01-21 10:40:18 UTC (rev 438)
+++ trunk/g15daemon-wip/g15daemon/utility_funcs.c 2008-01-22 08:53:30 UTC (rev 439)
@@ -82,8 +82,11 @@
}
void g15daemon_send_refresh(lcd_t *lcd) {
- lcd->ident=random();
- pthread_cond_broadcast(&lcd_refresh);
+ struct timeval t;
+ gettimeofday(&t,NULL);
+ lcd->ident=t.tv_usec+random();
+ if(lcd==lcd->masterlist->current->lcd)
+ pthread_cond_broadcast(&lcd_refresh);
}
void g15daemon_wait_refresh() {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|