mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-06 07:33:17 +00:00
2008-08-21 Ralf Corsépius <ralf.corsepius@rtems.org>
* ftpd/ftpd.c: Don't use annonymous unions.
This commit is contained in:
@@ -1,3 +1,7 @@
|
|||||||
|
2008-08-21 Ralf Corsépius <ralf.corsepius@rtems.org>
|
||||||
|
|
||||||
|
* ftpd/ftpd.c: Don't use annonymous unions.
|
||||||
|
|
||||||
2008-08-21 Ralf Corsépius <ralf.corsepius@rtems.org>
|
2008-08-21 Ralf Corsépius <ralf.corsepius@rtems.org>
|
||||||
|
|
||||||
* libblock/src/flashdisk.c: Remove bool, true, false.
|
* libblock/src/flashdisk.c: Remove bool, true, false.
|
||||||
|
|||||||
@@ -1441,7 +1441,7 @@ command_port(FTPD_SessionInfo_t *info, char const *args)
|
|||||||
struct {
|
struct {
|
||||||
uint32_t ip;
|
uint32_t ip;
|
||||||
uint16_t port;
|
uint16_t port;
|
||||||
};
|
} u ;
|
||||||
} ip_info;
|
} ip_info;
|
||||||
|
|
||||||
for(i = 0; i < NUM_FIELDS; ++i)
|
for(i = 0; i < NUM_FIELDS; ++i)
|
||||||
@@ -1456,10 +1456,10 @@ command_port(FTPD_SessionInfo_t *info, char const *args)
|
|||||||
/* Note: while it contradicts with RFC959, we don't allow PORT command
|
/* Note: while it contradicts with RFC959, we don't allow PORT command
|
||||||
* to specify IP address different than those of the originating client
|
* to specify IP address different than those of the originating client
|
||||||
* for the sake of safety. */
|
* for the sake of safety. */
|
||||||
if (ip_info.ip == info->def_addr.sin_addr.s_addr)
|
if (ip_info.u.ip == info->def_addr.sin_addr.s_addr)
|
||||||
{
|
{
|
||||||
info->data_addr.sin_addr.s_addr = ip_info.ip;
|
info->data_addr.sin_addr.s_addr = ip_info.u.ip;
|
||||||
info->data_addr.sin_port = ip_info.port;
|
info->data_addr.sin_port = ip_info.u.port;
|
||||||
info->data_addr.sin_family = AF_INET;
|
info->data_addr.sin_family = AF_INET;
|
||||||
memset(info->data_addr.sin_zero, 0, sizeof(info->data_addr.sin_zero));
|
memset(info->data_addr.sin_zero, 0, sizeof(info->data_addr.sin_zero));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user