patch-tftpd_c 740 B

1234567891011121314151617181920
  1. $Id: update-patches 24 2008-08-31 14:56:13Z wbx $
  2. --- atftp-0.7.orig/tftpd.c 2004-02-27 03:05:26.000000000 +0100
  3. +++ atftp-0.7/tftpd.c 2008-10-09 11:58:48.000000000 +0200
  4. @@ -230,14 +230,8 @@ int main(int argc, char **argv)
  5. /* find the port */
  6. if (tftpd_port == 0)
  7. - {
  8. - if ((serv = getservbyname("tftp", "udp")) == NULL)
  9. - {
  10. - logger(LOG_ERR, "atftpd: udp/tftp, unknown service");
  11. - exit(1);
  12. - }
  13. - tftpd_port = ntohs(serv->s_port);
  14. - }
  15. + tftpd_port = htons(69);
  16. +
  17. /* initialise sockaddr_in structure */
  18. memset(&sa, 0, sizeof(sa));
  19. sa.sin_family = AF_INET;