Thread: pg_hba.conf can't write

pg_hba.conf can't write

From
"Hiroshi Saito"
Date:
Hi Andreas.

Strange action?

<-----dlgHbaConfig.cpp------->

void dlgHbaConfig::OnOK(wxCommandEvent& ev)
{
    line->isComment = !chkEnabled->GetValue();
    line->connectType = (pgHbaConfigLine::pgHbaConnectType)cbType->GetSelection();
    line->database = database;
    line->user = user;
    line->ipaddress = txtIPaddress->GetValue();
    line->method = (pgHbaConfigLine::pgHbaMethod)cbMethod->GetSelection();
    line->option = txtOption->GetValue();

    wxMessageBox(txtIPaddress->GetValue());    //The input of the change (A) -- Debug Message
    wxMessageBox(line->text);                          //strange result (B) -- Debug Message

    EndModal(wxID_OK);
}

The value of (A) isn't taken over in (B).?
Then, a result isn't kept. It is strange.
Is this countermeasure possible for you?
Or, do I have misunderstanding?

regards,
Hiroshi Saito





Re: pg_hba.conf can't write

From
"Hiroshi Saito"
Date:
Hi Andreas.

Please check it.
This seems to succeed.

regards,
Hiroshi Saito

Attachment

Re: pg_hba.conf can't write

From
Andreas Pflug
Date:
Hiroshi Saito wrote:

>
>     wxMessageBox(txtIPaddress->GetValue());    //The input of the change (A) -- Debug Message
>     wxMessageBox(line->text);                          //strange result (B) -- Debug Message
>
>     EndModal(wxID_OK);
> }
>
> The value of (A) isn't taken over in (B).?

This is correct. Actually, pgHbaConfigLine::GetText wasn't fully
implemented; done now.

Regards,
Andreas

Re: pg_hba.conf can't write

From
"Hiroshi Saito"
Date:
Hi Andreas.

From: "Andreas Pflug" <pgadmin@pse-consulting.de>

> > The value of (A) isn't taken over in (B).?
>
> This is correct. Actually, pgHbaConfigLine::GetText wasn't fully
> implemented; done now.

Thank you very much.!:-)

However, It can't change into the comment line.
Please apply it.

One more strange..
OK button of the save is tough, and it doesn't become quiet.
This is investigate.

regards,
Hiroshi Saito

Attachment

Re: pg_hba.conf can't write

From
Andreas Pflug
Date:
Hiroshi Saito wrote:

>
> However, It can't change into the comment line.
> Please apply it.
>

> ------------------------------------------------------------------------
>
> --- src/ui/dlgHbaConfig.cpp.orig    Thu Dec 16 02:07:11 2004
> +++ src/ui/dlgHbaConfig.cpp    Thu Dec 16 02:07:39 2004
> @@ -297,7 +297,7 @@
>
>      }
>      btnOK->Enable(cbType->GetSelection() >= 0 && !database.IsEmpty() && !user.IsEmpty() &&
> -            cbMethod->GetSelection() >= 0 && ipValid);
> +            cbMethod->GetSelection() >= 0);

I don't like this fix. The check is ok, but ipValid is wrong;
preliminarily fixed.
Maybe you find the time to implement the checking code in line 298ff for
IPV4 an IPV6 and both flavours of netmasks.

Regards,
Andreas

Re: pg_hba.conf can't write

From
"Hiroshi Saito"
Date:
Hi Andreas.

This sees the solution of the problem.
Check it, please.

>
> One more strange..
> OK button of the save is tough, and it doesn't become quiet.
> This is investigate.
>
> regards,
> Hiroshi Saito

Attachment

Re: pg_hba.conf can't write

From
Andreas Pflug
Date:
Hiroshi Saito wrote:
> Hi Andreas.
>
> This sees the solution of the problem.
> Check it, please.

I don't understand what the problem is.
But for sure, in the base class shouldn't be any code that checks for
derived classes' properties. If there's a problem in frmHbaConfig, it
should be fixed *there*.

Regards,
Andreas


>
>>One more strange..
>>OK button of the save is tough, and it doesn't become quiet.
>>This is investigate.
>>
>>regards,
>>Hiroshi Saito
>>
>>
>>------------------------------------------------------------------------
>>
>>--- src/ui/frmConfig.cpp.orig    Wed Dec 22 09:21:46 2004
>>+++ src/ui/frmConfig.cpp    Wed Dec 22 09:22:28 2004
>>@@ -199,6 +199,7 @@
>>     if (CheckChanged(event.CanVeto()) && event.CanVeto())
>>     {
>>         event.Veto();
>>+    if ( filetype != HBAFILE )
>>         return;
>>     }
>>     Destroy();
>>
>>
>>------------------------------------------------------------------------
>>
>>
>>---------------------------(end of broadcast)---------------------------
>>TIP 8: explain analyze is your friend