Updated LCDd server:
* Fixed bug that caused -c <config> option to fail * Added -a <addr> option: address to bind to * Added -p <port> option: port to listen on
This commit is contained in:
+9
-2
@@ -147,7 +147,7 @@ main (int argc, char **argv)
|
|||||||
|
|
||||||
i = 0;
|
i = 0;
|
||||||
// analyze options here..
|
// analyze options here..
|
||||||
while ((c = getopt(argc, argv, "d:hfiw:c:")) > 0) {
|
while ((c = getopt(argc, argv, "a:p:d:hfiw:c:")) > 0) {
|
||||||
switch(c) {
|
switch(c) {
|
||||||
case 'd':
|
case 'd':
|
||||||
// Add to a list of drivers to be initialized later...
|
// Add to a list of drivers to be initialized later...
|
||||||
@@ -158,6 +158,12 @@ main (int argc, char **argv)
|
|||||||
} else
|
} else
|
||||||
fprintf(stderr, "too many drivers!");
|
fprintf(stderr, "too many drivers!");
|
||||||
break;
|
break;
|
||||||
|
case 'p':
|
||||||
|
lcd_port = atoi(optarg);
|
||||||
|
break;
|
||||||
|
case 'a':
|
||||||
|
strncpy(bind_addr, optarg, sizeof(bind_addr));
|
||||||
|
break;
|
||||||
case 'h':
|
case 'h':
|
||||||
HelpScreen ();
|
HelpScreen ();
|
||||||
break;
|
break;
|
||||||
@@ -165,7 +171,7 @@ main (int argc, char **argv)
|
|||||||
daemon_mode = 0;
|
daemon_mode = 0;
|
||||||
break;
|
break;
|
||||||
case 'c':
|
case 'c':
|
||||||
strncmp(cfgfile, optarg, sizeof(cfgfile));
|
strncpy(cfgfile, optarg, sizeof(cfgfile));
|
||||||
break;
|
break;
|
||||||
case 'i':
|
case 'i':
|
||||||
disable_server_screen = 1;
|
disable_server_screen = 1;
|
||||||
@@ -626,6 +632,7 @@ void
|
|||||||
HelpScreen ()
|
HelpScreen ()
|
||||||
{
|
{
|
||||||
// This cleans up any messes on the display output if needed...
|
// This cleans up any messes on the display output if needed...
|
||||||
|
if (lcd_ptr)
|
||||||
if (lcd_ptr->framebuf != NULL)
|
if (lcd_ptr->framebuf != NULL)
|
||||||
lcd_ptr->close();
|
lcd_ptr->close();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user