Changeset 61bfc370 in mainline for uspace/srv/net/tl/tcp/tcp.c


Ignore:
Timestamp:
2011-01-07T18:57:55Z (14 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e08a733
Parents:
7c34b28f
Message:
  • make measured_string and other network-related data types binary-safe
  • fix several network-related routines binary-safe (replace clearly suspicious use of str_lcmp() with bcmp())
  • rename spawn() to net_spawn()
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/net/tl/tcp/tcp.c

    r7c34b28f r61bfc370  
    154154
    155155        /** Port map key. */
    156         char *key;
     156        uint8_t *key;
    157157
    158158        /** Port map key length. */
     
    358358        /* Find the destination socket */
    359359        socket = socket_port_find(&tcp_globals.sockets,
    360             ntohs(header->destination_port), (const char *) src, addrlen);
     360            ntohs(header->destination_port), (uint8_t *) src, addrlen);
    361361        if (!socket) {
    362362                /* Find the listening destination socket */
    363363                socket = socket_port_find(&tcp_globals.sockets,
    364                     ntohs(header->destination_port), SOCKET_MAP_KEY_LISTENING,
    365                     0);
     364                    ntohs(header->destination_port),
     365                    (uint8_t *) SOCKET_MAP_KEY_LISTENING, 0);
    366366        }
    367367
     
    998998        /* Find the destination socket */
    999999        listening_socket = socket_port_find(&tcp_globals.sockets,
    1000             listening_port, SOCKET_MAP_KEY_LISTENING, 0);
     1000            listening_port, (uint8_t *) SOCKET_MAP_KEY_LISTENING, 0);
    10011001        if (!listening_socket ||
    10021002            (listening_socket->socket_id != listening_socket_id)) {
     
    10221022
    10231023        rc = socket_port_add(&tcp_globals.sockets, listening_port, socket,
    1024             (const char *) socket_data->addr, socket_data->addrlen);
     1024            (uint8_t *) socket_data->addr, socket_data->addrlen);
    10251025        assert(socket == socket_port_find(&tcp_globals.sockets, listening_port,
    1026             (const char *) socket_data->addr, socket_data->addrlen));
     1026            (uint8_t *) socket_data->addr, socket_data->addrlen));
    10271027
    10281028//      rc = socket_bind_free_port(&tcp_globals.sockets, socket,
     
    21092109
    21102110        /* Copy the key */
    2111         operation_timeout->key = ((char *) operation_timeout) +
     2111        operation_timeout->key = ((uint8_t *) operation_timeout) +
    21122112            sizeof(*operation_timeout);
    21132113        operation_timeout->key_length = socket->key_length;
Note: See TracChangeset for help on using the changeset viewer.