Import Upstream version 1.9.1.0.svn346

This commit is contained in:
Giacomo Catenazzi committed 2019-04-29 15:43:02 +02:00
1 parent 9404a6167d
commit 9602397440
24 files changed
+134 -247

No files matched your search

+6 -3
View File
@@ -3,11 +3,14 @@ METASOURCES = AUTO
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
+9 -4
View File
@@ -17,7 +17,7 @@
(c) 2006 Mike Lampard, Philip Lawatsch, and others
$Revision: 299 $ - $Date: 2007-09-09 19:19:52 +0200 (Sun, 09 Sep 2007) $ $Author: mlampard $
$Revision: 329 $ - $Date: 2007-11-30 06:15:06 +0100 (Fri, 30 Nov 2007) $ $Author: mlampard $
This daemon listens on localhost port 15550 for client connections,
and arbitrates LCD display. Allows for multiple simultaneous clients.
@@ -40,7 +40,7 @@
#include <libg15.h>
#include <g15daemon.h>
static int leaving;
static int leaving = 0;
int server_events(plugin_event_t *myevent);
#ifndef SO_PRIORITY
@@ -108,7 +108,8 @@ static void process_client_cmds(lcdnode_t *lcdnode, int sock, unsigned int *msgb
}
else if (msgbuf[0] & CLIENT_CMD_BACKLIGHT)
{
send(sock,&lcdnode->lcd->backlight_state,1,MSG_OOB);
unsigned char retval = lcdnode->lcd->backlight_state;
send(sock,&retval,1,MSG_OOB);
lcdnode->lcd->backlight_state = msgbuf[0]-0x80;
lcdnode->lcd->state_changed = 1;
}
@@ -426,10 +427,14 @@ int server_events(plugin_event_t *event) {
return G15_PLUGIN_OK;
}
static void g15plugin_net_exit() {
leaving = 1;
}
/* if no exitfunc or eventhandler, member should be NULL */
plugin_info_t g15plugin_info[] = {
/* TYPE, name, initfunc, updatefreq, exitfunc, eventhandler, initfunc */
{G15_PLUGIN_LCD_SERVER, "LCDServer" , (void*)lcdserver_thread, 500, NULL, (void*)server_events, NULL},
{G15_PLUGIN_LCD_SERVER, "LCDServer" , (void*)lcdserver_thread, 500, g15plugin_net_exit, (void*)server_events, NULL},
{G15_PLUGIN_NONE, "" , NULL, 0, NULL, NULL, NULL}
};