Minor updates:

- Rename function ApplicationCore::GetProcessName -> GetFileName
- Correct misspelled variable "Persistent" in CSelectableCore::Init
- Clear compiler warning: Persistent not initialised
This commit is contained in:
2023-07-07 11:01:56 +02:00
parent 7dfdfdb4ce
commit 851a911c6d
3 changed files with 18 additions and 18 deletions

View File

@@ -107,7 +107,7 @@ bool CSelectableCore::Init( CDataMember * FunctionConfig )
short Parity;
short FlowCtrl;
short Queue;
bool Persitent;
bool Persistent = false;
// Call Previous load config
if (!CFunctionCore::Init( FunctionConfig ))
@@ -162,7 +162,7 @@ bool CSelectableCore::Init( CDataMember * FunctionConfig )
SerialConfig->GetChInt( "DataBits", 8, true ),
Parity, SerialConfig->GetChInt( "StopBits", 1, true ),
FlowCtrl, SerialConfig->GetChInt( "DataWait", 0, true ));
Persitent = true;
Persistent = true;
}
}
else if (!strcasecmp( Type, "LinePrinter" )) {
@@ -173,7 +173,7 @@ bool CSelectableCore::Init( CDataMember * FunctionConfig )
Address = (char*)HandleConfig->GetChStr( "Port/Address", NULL, true ); // Get default value
SetLinePrinterHandle( Handle, Address );
Persitent = true;
Persistent = true;
}
else if (!strcasecmp( Type, "UNIXserver" )) {
// Get UNIX socket handle
@@ -184,7 +184,7 @@ bool CSelectableCore::Init( CDataMember * FunctionConfig )
Queue = HandleConfig->GetChInt( "Socket/Queue", 2, true );
SetUnixHandle( Handle, ctUNIXserver, Address, Queue );
Persitent = true;
Persistent = true;
}
else if (!strcasecmp( Type, "UNIXclient" )) {
// Get UNIX socket handle
@@ -194,7 +194,7 @@ bool CSelectableCore::Init( CDataMember * FunctionConfig )
Address = (char*)HandleConfig->GetChStr( "Socket/Address", NULL, true ); // Get default Address value
SetUnixHandle( Handle, ctUNIXclient, Address, 0 );
Persitent = false;
Persistent = false;
}
else if (!strcasecmp( Type, "UDPserver" )) {
// Get UDP address & port
@@ -207,7 +207,7 @@ bool CSelectableCore::Init( CDataMember * FunctionConfig )
Port = (char*)HandleConfig->GetChStr( "Socket/Port", "0", true ); // Get default Port value
}
SetSocketHandle( Handle, ctUDPserver, Address, strlcase(Port), 0 );
Persitent = true;
Persistent = true;
}
else if (!strcasecmp( Type, "UDPclient" )) {
// Get UDP address & port
@@ -220,7 +220,7 @@ bool CSelectableCore::Init( CDataMember * FunctionConfig )
Port = (char*)HandleConfig->GetChStr( "Socket/Port", "0", true ); // Get default Port value
}
SetSocketHandle( Handle, ctUDPclient, Address, strlcase(Port), 0 );
Persitent = false;
Persistent = false;
}
else if (!strcasecmp( Type, "TCPserver" )) {
// Get TCP address & port
@@ -234,7 +234,7 @@ bool CSelectableCore::Init( CDataMember * FunctionConfig )
}
Queue = HandleConfig->GetChInt( "Socket/Queue", 2, true );
SetSocketHandle( Handle, ctTCPserver, Address, strlcase(Port), Queue );
Persitent = true;
Persistent = true;
}
else if (!strcasecmp( Type, "TCPclient" )) {
// Get TCP address & port
@@ -247,20 +247,20 @@ bool CSelectableCore::Init( CDataMember * FunctionConfig )
Port = (char*)HandleConfig->GetChStr( "Socket/Port", "0", true ); // Get default Port value
}
SetSocketHandle( Handle, ctTCPclient, Address, strlcase(Port), 0 );
Persitent = false;
Persistent = false;
}
else if (!strcasecmp( Type, "ForkPipe" )) {
// Get fork pipe handle
Address = (char*)HandleConfig->GetChStr( "Fork/ExecPath", NULL, true ); // Get default value
SetForkPipeHandle( Handle, Address );
Persitent = true;
Persistent = true;
}
// Set Auto Manage
SetAutoManage( Handle, HandleConfig->GetChBool( "AutoManage/Enabled", true, true ),
HandleConfig->GetChBool( "AutoManage/Persistent", Persitent, true ),
HandleConfig->GetChInt( "AutoManage/ReopenDelay", 2000, true ),
HandleConfig->GetChInt( "AutoManage/CloseTimeout", 2000, true ));
SetAutoManage( Handle, HandleConfig->GetChBool( "AutoManage/Enabled", true, true ),
HandleConfig->GetChBool( "AutoManage/Persistent", Persistent, true ),
HandleConfig->GetChInt( "AutoManage/ReopenDelay", 2000, true ),
HandleConfig->GetChInt( "AutoManage/CloseTimeout", 2000, true ));
// Input buffer
SetInBuffer( Handle, HandleConfig->GetChInt( "InputBuffer/Size", 0 ),