rejetto forum

Software => HFS ~ HTTP File Server => Programmers corner => Topic started by: Mars on March 14, 2010, 08:58:50 PM

Title: dyndns problem
Post by: Mars on March 14, 2010, 08:58:50 PM
As soon as we use the dyndns wizard, it is not possible any more to erase the corresponding field and it even by using the custom, the only solution: mark disable in the menu.

I glimpse another solution: be able to leave space the custom zone to reset without having to get(touch) the file ini.
Quote
procedure forceDynDNSupdate(url:string='');
const
  MSG = 'This option makes pointless the option "Find external address at startup", which has now been disabled for your convenience.';
begin
dyndns.url:=url;
if url='' then exit;
// this function is called when setting any dyndns service.
....

It was, either adopt this solution which has no consequence on the rest of the program, or to add a menu clear above disable ;)
Title: Re: dyndns problem
Post by: rejetto on March 14, 2010, 10:44:40 PM
accepted
Title: Re: dyndns problem
Post by: Mars on March 15, 2010, 12:20:12 AM
missing to reset the dyndns field  :o

Quote
procedure forceDynDNSupdate(url:string='');
const
  MSG = 'This option makes pointless the option "Find external address at startup", which has now been disabled for your convenience.';
begin
dyndns.url:=url;
if url='' then
  begin
  fillchar(dyndns, sizeof(dyndns),0);
  exit;
  end;
// this function is called when setting any dyndns service.

PS: pour silentpliz, attendre l'accord du boss pour la modif de ce post ;)
Title: Re: dyndns problem
Post by: rejetto on March 15, 2010, 02:34:04 PM
what are the bad effects of not clearing the rest of dyndns?
Title: Re: dyndns problem
Post by: Mars on March 15, 2010, 02:57:32 PM
i thinks that it is more short that to have to do

with dyndns do
  begin:='';
  url:='';
  lastResult:='';
  lastIP:='';
  user:='';
  pwd:='';
  host:='';
  active:= false;
  end;

and old information are then cleared

not?
Title: Re: dyndns problem
Post by: rejetto on March 15, 2010, 03:01:32 PM
you misunderstood me.
i didn't ask why using fillchar instead of assignment.
but what happens (bad) if we do NOTHING about it. :)


about using fillchar, i usually prefer it, but we should first ensure that the memory is deallocated, since strings are allocated dynamically.
Title: Re: dyndns problem
Post by: Mars on March 15, 2010, 03:10:18 PM
To leave fields space is a solution to purge wizards but certain information as the password and the username remain stored in the ini during the saving of options

dynamic-dns-updater=
dynamic-dns-user=lolo
dynamic-dns-host=lolo.no-ip.com


detected one bug


+'listen-on='+listenOn+CRLF
+'external-ip-server'+customIPservice+CRLF     //missing one =
+'dynamic-dns-updater='+base64encode(dyndns.url)+CRLF
Title: Re: dyndns problem
Post by: rejetto on March 15, 2010, 03:26:11 PM
To leave fields space is a solution to purge wizards but certain information as the password and the username remain stored in the ini during the saving of options

don't you think that those information is likely to be useful to the user whenever he will re-use the wizard.
the password is not stored in the ini. the url is. but when you clear the url you clear also the password from the ini.


dynamic-dns-updater=

Quote
+'external-ip-server'+customIPservice+CRLF     //missing one =

thank you
Title: Re: dyndns problem
Post by: Mars on March 15, 2010, 04:45:05 PM
Quote
don't you think that those information is likely to be useful to the user whenever he will re-use the wizard.

It would be in this case preferable to add a submenu Clear to purge all infos and not only the url

it is not possible to delete unwanted informations except by editing hfs.ini. ???
Title: Re: dyndns problem
Post by: rejetto on March 15, 2010, 05:45:32 PM
i don't see privacy or security risks.
how can it harm?
Title: Re: dyndns problem
Post by: Mars on March 15, 2010, 06:12:14 PM
It is not a question of risk, but only a logical choice, if we do the housework in a place, so much to take advantage of it to make it everywhere. is'nt it? :D

Title: Re: dyndns problem
Post by: rejetto on March 15, 2010, 06:33:16 PM
i see more logical to leave something potentially useful that has no con.