Skip to content
Snippets Groups Projects
Commit 4dc0d3a6 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Allow the max concurrent connections setting to be edited here

Also, disable the QWK packet creation timeout edit when QWK packet
download support is disabled.
parent 2bc0e24a
Branches
Tags
No related merge requests found
......@@ -69,6 +69,7 @@ void __fastcall TFtpCfgDlg::FormShow(TObject *Sender)
PasvIpLookupCheckBox->Checked=MainForm->ftp_startup.options&FTP_OPT_LOOKUP_PASV_IP;
PasvPortLowEdit->Text=AnsiString((int)MainForm->ftp_startup.pasv_port_low);
PasvPortHighEdit->Text=AnsiString((int)MainForm->ftp_startup.pasv_port_high);
MaxConConEdit->Text = AnsiString((int)MainForm->ftp_startup.max_concurrent_connections);
IndexFileNameEdit->Text=AnsiString(MainForm->ftp_startup.index_file_name);
AnswerSoundEdit->Text=AnsiString(MainForm->ftp_startup.answer_sound);
......@@ -87,6 +88,8 @@ void __fastcall TFtpCfgDlg::FormShow(TObject *Sender)
AutoIndexCheckBox->Checked=MainForm->ftp_startup.options&FTP_OPT_INDEX_FILE;
AutoIndexCheckBoxClick(Sender);
PasvIpLookupCheckBoxClick(Sender);
QwkTimeoutEdit->Enabled = AllowQWKCheckBox->Checked;
QwkTimeoutLabel->Enabled = AllowQWKCheckBox->Checked;
PageControl->ActivePage=GeneralTabSheet;
}
......@@ -122,6 +125,7 @@ void __fastcall TFtpCfgDlg::OKBtnClick(TObject *Sender)
MainForm->ftp_startup.max_inactivity=MaxInactivityEdit->Text.ToIntDef(FTP_DEFAULT_MAX_INACTIVITY);
MainForm->ftp_startup.qwk_timeout=QwkTimeoutEdit->Text.ToIntDef(FTP_DEFAULT_QWK_TIMEOUT);
MainForm->ftp_startup.port=PortEdit->Text.ToIntDef(IPPORT_FTP);
MainForm->ftp_startup.max_concurrent_connections = MaxConConEdit->Text.ToIntDef(0);
MainForm->FtpAutoStart=AutoStartCheckBox->Checked;
MainForm->FtpLogFile=LogFileCheckBox->Checked;
......@@ -220,3 +224,11 @@ void __fastcall TFtpCfgDlg::PasvIpLookupCheckBoxClick(TObject *Sender)
}
//---------------------------------------------------------------------------
void __fastcall TFtpCfgDlg::AllowQWKCheckBoxClick(TObject *Sender)
{
QwkTimeoutEdit->Enabled = AllowQWKCheckBox->Checked;
QwkTimeoutLabel->Enabled = AllowQWKCheckBox->Checked;
}
//---------------------------------------------------------------------------
object FtpCfgDlg: TFtpCfgDlg
Left = 837
Top = 423
Left = 1282
Top = 534
BorderStyle = bsDialog
Caption = 'FTP Server Configuration'
ClientHeight = 245
......@@ -58,13 +58,21 @@ object FtpCfgDlg: TFtpCfgDlg
Caption = 'Interfaces (IPs)'
end
object QwkTimeoutLabel: TLabel
Left = 7
Left = 148
Top = 138
Width = 78
Height = 20
AutoSize = False
Caption = 'QWK Timeout'
end
object MaxConConLabel: TLabel
Left = 7
Top = 138
Width = 85
Height = 19
AutoSize = False
Caption = 'Max Con-Conn'
end
object AutoStartCheckBox: TCheckBox
Left = 7
Top = 10
......@@ -122,18 +130,19 @@ object FtpCfgDlg: TFtpCfgDlg
end
object AllowQWKCheckBox: TCheckBox
Left = 148
Top = 60
Top = 109
Width = 119
Height = 20
Hint = 'Allow QWK packet transfers'
Caption = 'QWK Packets'
ParentShowHint = False
ShowHint = True
TabOrder = 7
TabOrder = 9
OnClick = AllowQWKCheckBoxClick
end
object LocalFileSysCheckBox: TCheckBox
Left = 148
Top = 86
Top = 62
Width = 119
Height = 20
Hint =
......@@ -142,7 +151,7 @@ object FtpCfgDlg: TFtpCfgDlg
Caption = 'Local File System'
ParentShowHint = False
ShowHint = True
TabOrder = 8
TabOrder = 7
end
object HostnameCheckBox: TCheckBox
Left = 148
......@@ -157,23 +166,33 @@ object FtpCfgDlg: TFtpCfgDlg
end
object DirFilesCheckBox: TCheckBox
Left = 148
Top = 110
Top = 86
Width = 125
Height = 20
Hint = 'Allow users access to files in directory, but not in database'
Caption = 'Directory File Access'
ParentShowHint = False
ShowHint = True
TabOrder = 9
TabOrder = 8
end
object QwkTimeoutEdit: TEdit
Left = 85
Left = 223
Top = 138
Width = 39
Height = 21
Hint = 'Maximum number of seconds before QWK packet creation timeout'
ParentShowHint = False
ShowHint = True
TabOrder = 10
end
object MaxConConEdit: TEdit
Left = 85
Top = 138
Width = 39
Height = 21
Hint = 'Maximum Concurrent Connections from same IP (0=unlimited)'
ParentShowHint = False
ShowHint = True
TabOrder = 6
end
end
......
......@@ -86,6 +86,8 @@ __published:
TEdit *PasvPortHighEdit;
TLabel *PasvPortThroughLabel;
TCheckBox *PasvIpLookupCheckBox;
TLabel *MaxConConLabel;
TEdit *MaxConConEdit;
void __fastcall FormShow(TObject *Sender);
void __fastcall OKBtnClick(TObject *Sender);
void __fastcall AnswerSoundButtonClick(TObject *Sender);
......@@ -93,6 +95,7 @@ __published:
void __fastcall AutoIndexCheckBoxClick(TObject *Sender);
void __fastcall HackAttemptSoundButtonClick(TObject *Sender);
void __fastcall PasvIpLookupCheckBoxClick(TObject *Sender);
void __fastcall AllowQWKCheckBoxClick(TObject *Sender);
private:
public:
virtual __fastcall TFtpCfgDlg(TComponent* AOwner);
......
object MailCfgDlg: TMailCfgDlg
Left = 1274
Top = 822
Left = 1214
Top = 710
BorderStyle = bsDialog
Caption = 'Mail Server Configuration'
ClientHeight = 246
......
object MainForm: TMainForm
Left = 760
Top = 266
Left = 733
Top = 639
Width = 793
Height = 398
Caption = 'Synchronet Control Panel'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment