Index: redboot/current/ChangeLog =================================================================== RCS file: /cvs/ecos/ecos/packages/redboot/current/ChangeLog,v retrieving revision 1.185 diff -u -r1.185 ChangeLog --- redboot/current/ChangeLog 25 Feb 2004 17:32:49 -0000 1.185 +++ redboot/current/ChangeLog 26 Feb 2004 11:05:05 -0000 @@ -1,3 +1,8 @@ +2004-02-26 Jani Monoses + + * src/load.c: + * src/net/http_client.c: Allow overriding the default HTTP port. + 2004-02-25 Gratian Crisan * src/xyzModem.c: Do not read an information header for XModem Index: redboot/current/src/load.c =================================================================== RCS file: /cvs/ecos/ecos/packages/redboot/current/src/load.c,v retrieving revision 1.39 diff -u -r1.39 load.c --- redboot/current/src/load.c 24 Feb 2004 14:15:15 -0000 1.39 +++ redboot/current/src/load.c 26 Feb 2004 11:05:06 -0000 @@ -584,7 +584,7 @@ char *mode_str; #ifdef CYGPKG_REDBOOT_NETWORKING struct sockaddr_in host; - bool hostname_set; + bool hostname_set, port_set; char *hostname; #endif bool decompress = false; @@ -600,6 +600,7 @@ connection_info_t info; getc_io_funcs_t *io = NULL; struct load_io_entry *io_tab; + unsigned int port; //int because it's an OPTION_ARG_TYPE_NUM, but will be cast to short #ifdef CYGSEM_REDBOOT_VALIDATE_USER_RAM_LOADS bool spillover_ok = false; #endif @@ -630,6 +631,9 @@ init_opts(&opts[num_options], 'h', true, OPTION_ARG_TYPE_STR, (void *)&hostname, (bool *)&hostname_set, "host name or IP address"); num_options++; + init_opts(&opts[num_options], 'p', true, OPTION_ARG_TYPE_NUM, + (void *)&port, (bool *)&port_set, "TCP port"); + num_options++; #endif #ifdef CYGBLD_BUILD_REDBOOT_WITH_ZLIB init_opts(&opts[num_options], 'd', false, OPTION_ARG_TYPE_FLG, @@ -655,6 +659,8 @@ return; } } + if (port_set) + host.sin_port = port; #endif if (chan >= CYGNUM_HAL_VIRTUAL_VECTOR_NUM_CHANNELS) { diag_printf("Invalid I/O channel: %d\n", chan); Index: redboot/current/src/net/http_client.c =================================================================== RCS file: /cvs/ecos/ecos/packages/redboot/current/src/net/http_client.c,v retrieving revision 1.6 diff -u -r1.6 http_client.c --- redboot/current/src/net/http_client.c 3 Apr 2003 15:21:10 -0000 1.6 +++ redboot/current/src/net/http_client.c 26 Feb 2004 11:05:06 -0000 @@ -85,7 +85,8 @@ int res; struct _stream *s = &http_stream; - info->server->sin_port = 80; // HTTP port + if (!info->server->sin_port) + info->server->sin_port = 80; // HTTP port if ((res = __tcp_open(&s->sock, info->server, get_port++, 5000, err)) < 0) { *err = HTTP_OPEN; return -1;