Import Upstream version 1.9.1.0.svn346
This commit is contained in:
1 parent
9404a6167d
commit
9602397440
24 files changed
+134
-247
No files matched your search
@@ -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}
|
||||
};
|
||||
Reference in new issue
Block a user