public inbox for development@lists.ipfire.org
 help / color / mirror / Atom feed
From: "Peter Müller" <peter.mueller@link38.eu>
To: development@lists.ipfire.org
Subject: Re: [PATCH 2/3 v3] allow changing remote syslog protocol to TCP
Date: Mon, 20 Nov 2017 19:37:46 +0100	[thread overview]
Message-ID: <20171120193746.68d370d0.peter.mueller@link38.eu> (raw)
In-Reply-To: <1511192742.4838.539.camel@ipfire.org>

[-- Attachment #1: Type: text/plain, Size: 2900 bytes --]

Hello,

> On Sun, 2017-11-19 at 17:40 +0100, Peter Müller wrote:
> > Add option to change remote syslog protocol to TCP, which
> > is more reliable than UDP, but might be unsupported  on
> > older syslog servers.
> > 
> > Signed-off-by: Peter Müller <peter.mueller(a)link38.eu>
> > ---
> >  html/cgi-bin/logs.cgi/config.dat | 16 ++++++++++++++
> >  1 file changed, 16 insertions(+)
> > 
> > diff --git a/html/cgi-bin/logs.cgi/config.dat b/html/cgi-
> > bin/logs.cgi/config.dat
> > index 789341dbe..ec3c2a92d 100644
> > --- a/html/cgi-bin/logs.cgi/config.dat
> > +++ b/html/cgi-bin/logs.cgi/config.dat
> > @@ -33,6 +33,7 @@ $logsettings{'LOGWATCH_KEEP'} = '56';
> >  my @VS = ('15','50','100','150','250','500');
> >  $logsettings{'ENABLE_REMOTELOG'} = 'off';
> >  $logsettings{'REMOTELOG_ADDR'} = '';
> > +$logsettings{'REMOTELOG_PROTOCOL'} = 'udp';
> >  $logsettings{'ACTION'} = '';
> >  &Header::getcgihash(\%logsettings);
> >  
> > @@ -45,6 +46,10 @@ if ($logsettings{'ACTION'} eq $Lang::tr{'save'})
> >      {
> >        $errormessage = $Lang::tr{'invalid logserver address'};
> >      }
> > +    unless ($logsettings{'REMOTELOG_PROTOCOL'} =~ /^udp|tcp$/)
> > +    {
> > +
> > +    }  
> 
> So what was going to happen here?
There should be an error message in case invalid formula data was
received. Forgot the line, will send in another version of this. *sigh*

Sorry for all the noise here.

Best regards,
Peter Müller
> 
> >    }
> >    unless ($logsettings{'LOGWATCH_KEEP'} =~ /^\d+$/)
> >    {
> > @@ -69,6 +74,10 @@ $checked{'ENABLE_REMOTELOG'}{'off'} = '';
> >  $checked{'ENABLE_REMOTELOG'}{'on'} = '';
> >  $checked{'ENABLE_REMOTELOG'}{$logsettings{'ENABLE_REMOTELOG'}} =
> > "checked='checked'";
> >  
> > +$selected{'REMOTELOG_PROTOCOL'}{'udp'} = '';
> > +$selected{'REMOTELOG_PROTOCOL'}{'tcp'} == '';
> > +$selected{'REMOTELOG_PROTOCOL'}{$logsettings{'REMOTELOG_PROTOCOL'}} =
> > "selected='selected'";
> > +
> >  $checked{'LOGVIEW_REVERSE'}{'off'} = '';
> >  $checked{'LOGVIEW_REVERSE'}{'on'} = '';
> >  $checked{'LOGVIEW_REVERSE'}{$logsettings{'LOGVIEW_REVERSE'}} =
> > "checked='checked'";
> > @@ -139,6 +148,11 @@ print <<END
> >  <tr>
> >    <td class='base'>$Lang::tr{'enabled'}</td><td><input type='checkbox'
> > name='ENABLE_REMOTELOG' $checked{'ENABLE_REMOTELOG'}{'on'} /></td>
> >    <td>$Lang::tr{'log server address'}</td><td><input type='text'
> > name='REMOTELOG_ADDR' value='$logsettings{'REMOTELOG_ADDR'}' /></td>
> > +  <td>$Lang::tr{'log server protocol'}</td><td>
> > +  <select name='REMOTELOG_PROTOCOL'>
> > +  <option value='udp' $selected{'REMOTELOG_PROTOCOL'}{'udp'}>$Lang::tr{'udp
> > less overhead'}</option>
> > +  <option value='tcp' $selected{'REMOTELOG_PROTOCOL'}{'tcp'}>$Lang::tr{'tcp
> > more reliable'}</option>
> > +  </select></td>
> >  </tr>
> >  </table>
> >  END  


  reply	other threads:[~2017-11-20 18:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-19 16:40 Peter Müller
2017-11-20 15:45 ` Michael Tremer
2017-11-20 18:37   ` Peter Müller [this message]
2017-11-21 12:26     ` Michael Tremer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171120193746.68d370d0.peter.mueller@link38.eu \
    --to=peter.mueller@link38.eu \
    --cc=development@lists.ipfire.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox