>
> -#ifdef CYGPKG_PROFILE_TFTP
> - // Create a TFTP server to provide the data
> - // invoking this a second time is harmless
> - (void) tftpd_start(CYGNUM_PROFILE_TFTP_PORT, &profile_tftp_fileops);
> +#ifdef CYGPKG_PROFILE_TFTP
> + static int launched = 0;
> + if (!launched)
> + {
> + launched = 1;
> + // Create a TFTP server to provide the data
> + // invoking this a second time is harmless
> + (void) tftpd_start(CYGNUM_PROFILE_TFTP_PORT, &profile_tftp_fileops);
> + }
> #endif
> }
What seems strange here is that the comment says it is harmless to
invoke it a second time. Yet your launched flag seems to stop it being
launched a second time. And your patch keeps that comment.
Is the comment wrong? If so why did you keep it?
Like i said, i wanted to dig in deeper and understand the problem and
then the patch. Maybe you can provide an explanation?
Andrew