Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit 20a93d91 authored by rswindell's avatar rswindell

Added -SOCKET command-line option to specify socket/telnet communications

and provide socket descriptor (similar to the -HANDLE option for serial ports).
parent 9874bc24
......@@ -40,6 +40,7 @@
* Feb 27, 1996 6.00 BP Add -P COMx to command line help.
* Mar 03, 1996 6.10 BP Begin version 6.10.
* Apr 08, 1996 6.10 BP Added command-line parsing callbacks.
* Apr 24, 2002 6.22 RS Added -SOCKET parameter.
*/
#define BUILDING_OPENDOORS
......@@ -87,6 +88,7 @@ typedef enum
kParamGraphics,
kParamBBSName,
kParamPortHandle,
kParamSocketDescriptor,
kParamSilentMode,
kParamOption,
kParamUnknown
......@@ -273,6 +275,7 @@ ODAPIDEF void ODCALL od_parse_cmd_line(INT nArgCount, char *papszArguments[])
"-B x or -BPS x\t- Sets the serial port <---> modem bps (baud) rate to use.\n"
"-P x or -PORT x\t- Sets serial port to use. For COM1: use -P 0 or -P COM1, for COM2: use -P 1 or -P COM2, etc.\n"
"-HANDLE x\t- Provides an already open serial port handle.\n"
"-SOCKET x\t- Provides an already open TCP/IP socket descriptor.\n"
"-SILENT\t\t- Operate in silent mode, with no local display.\n"
"-MAXTIME x\t- Sets the maximum number of minutes that user will be permitted to access the door.\n"
"-G or -GRAPHICS\t- Unless followed by 0 or N, turns on ANSI display mode.\n"
......@@ -396,6 +399,10 @@ ODAPIDEF void ODCALL od_parse_cmd_line(INT nArgCount, char *papszArguments[])
od_control.system_name, sizeof(od_control.system_name));
break;
case kParamSocketDescriptor:
od_control.od_use_socket = TRUE;
/* fall through */
case kParamPortHandle:
ODAdvanceToNextArg(&nCurrentArg, nArgCount, pszCurrentArg);
od_control.od_open_handle = atoi(papszArguments[nCurrentArg]);
......@@ -640,6 +647,10 @@ static tCommandLineParameter ODGetCommandLineParameter(char *pszArgument)
{
return(kParamPortHandle);
}
else if(stricmp(pszArgument, "SOCKET") == 0)
{
return(kParamSocketDescriptor);
}
else if(stricmp(pszArgument, "SILENT") == 0)
{
return(kParamSilentMode);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment