Changeset 09ea257c in rtems
- Timestamp:
- 07/12/99 15:52:35 (24 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- 38e4a916
- Parents:
- 8e4b4bd
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/exec/libnetworking/lib/tftpDriver.c
r8e4b4bd r09ea257c 431 431 rtems_interval now; 432 432 rtems_status_code sc; 433 char *hostname; 433 434 434 435 /* … … 437 438 438 439 cp2 = iop->file_info; 439 if (*cp2 == '/') { 440 farAddress = rtems_bsdnet_bootp_server_address.s_addr; 440 441 cp1 = cp2; 442 while (*cp2 != '/') { 443 if (*cp2 == '\0') 444 return ENOENT; 445 cp2++; 441 446 } 442 else { 443 char *hostname; 444 445 cp1 = cp2; 446 while (*cp2 != '/') { 447 if (*cp2 == '\0') 448 return ENOENT; 449 cp2++; 450 } 451 452 len = cp2 - cp1; 453 hostname = malloc (len + 1); 454 if (hostname == NULL) 455 return ENOMEM; 456 457 strncpy (hostname, cp1, len); 458 hostname[len] = '\0'; 459 farAddress = inet_addr (hostname); 460 free (hostname); 461 } 447 448 len = cp2 - cp1; 449 hostname = malloc (len + 1); 450 if (hostname == NULL) 451 return ENOMEM; 452 453 strncpy (hostname, cp1, len); 454 hostname[len] = '\0'; 455 farAddress = inet_addr (hostname); 456 free (hostname); 462 457 463 458 if ((farAddress == 0) || (farAddress == ~0)) -
c/src/lib/libnetworking/lib/tftpDriver.c
r8e4b4bd r09ea257c 431 431 rtems_interval now; 432 432 rtems_status_code sc; 433 char *hostname; 433 434 434 435 /* … … 437 438 438 439 cp2 = iop->file_info; 439 if (*cp2 == '/') { 440 farAddress = rtems_bsdnet_bootp_server_address.s_addr; 440 441 cp1 = cp2; 442 while (*cp2 != '/') { 443 if (*cp2 == '\0') 444 return ENOENT; 445 cp2++; 441 446 } 442 else { 443 char *hostname; 444 445 cp1 = cp2; 446 while (*cp2 != '/') { 447 if (*cp2 == '\0') 448 return ENOENT; 449 cp2++; 450 } 451 452 len = cp2 - cp1; 453 hostname = malloc (len + 1); 454 if (hostname == NULL) 455 return ENOMEM; 456 457 strncpy (hostname, cp1, len); 458 hostname[len] = '\0'; 459 farAddress = inet_addr (hostname); 460 free (hostname); 461 } 447 448 len = cp2 - cp1; 449 hostname = malloc (len + 1); 450 if (hostname == NULL) 451 return ENOMEM; 452 453 strncpy (hostname, cp1, len); 454 hostname[len] = '\0'; 455 farAddress = inet_addr (hostname); 456 free (hostname); 462 457 463 458 if ((farAddress == 0) || (farAddress == ~0)) -
c/src/libnetworking/lib/tftpDriver.c
r8e4b4bd r09ea257c 431 431 rtems_interval now; 432 432 rtems_status_code sc; 433 char *hostname; 433 434 434 435 /* … … 437 438 438 439 cp2 = iop->file_info; 439 if (*cp2 == '/') { 440 farAddress = rtems_bsdnet_bootp_server_address.s_addr; 440 441 cp1 = cp2; 442 while (*cp2 != '/') { 443 if (*cp2 == '\0') 444 return ENOENT; 445 cp2++; 441 446 } 442 else { 443 char *hostname; 444 445 cp1 = cp2; 446 while (*cp2 != '/') { 447 if (*cp2 == '\0') 448 return ENOENT; 449 cp2++; 450 } 451 452 len = cp2 - cp1; 453 hostname = malloc (len + 1); 454 if (hostname == NULL) 455 return ENOMEM; 456 457 strncpy (hostname, cp1, len); 458 hostname[len] = '\0'; 459 farAddress = inet_addr (hostname); 460 free (hostname); 461 } 447 448 len = cp2 - cp1; 449 hostname = malloc (len + 1); 450 if (hostname == NULL) 451 return ENOMEM; 452 453 strncpy (hostname, cp1, len); 454 hostname[len] = '\0'; 455 farAddress = inet_addr (hostname); 456 free (hostname); 462 457 463 458 if ((farAddress == 0) || (farAddress == ~0)) -
cpukit/libnetworking/lib/tftpDriver.c
r8e4b4bd r09ea257c 431 431 rtems_interval now; 432 432 rtems_status_code sc; 433 char *hostname; 433 434 434 435 /* … … 437 438 438 439 cp2 = iop->file_info; 439 if (*cp2 == '/') { 440 farAddress = rtems_bsdnet_bootp_server_address.s_addr; 440 441 cp1 = cp2; 442 while (*cp2 != '/') { 443 if (*cp2 == '\0') 444 return ENOENT; 445 cp2++; 441 446 } 442 else { 443 char *hostname; 444 445 cp1 = cp2; 446 while (*cp2 != '/') { 447 if (*cp2 == '\0') 448 return ENOENT; 449 cp2++; 450 } 451 452 len = cp2 - cp1; 453 hostname = malloc (len + 1); 454 if (hostname == NULL) 455 return ENOMEM; 456 457 strncpy (hostname, cp1, len); 458 hostname[len] = '\0'; 459 farAddress = inet_addr (hostname); 460 free (hostname); 461 } 447 448 len = cp2 - cp1; 449 hostname = malloc (len + 1); 450 if (hostname == NULL) 451 return ENOMEM; 452 453 strncpy (hostname, cp1, len); 454 hostname[len] = '\0'; 455 farAddress = inet_addr (hostname); 456 free (hostname); 462 457 463 458 if ((farAddress == 0) || (farAddress == ~0))
Note: See TracChangeset
for help on using the changeset viewer.