Changeset 7fb2ce3 in mainline


Ignore:
Timestamp:
2010-02-17T00:27:50Z (14 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f430f58
Parents:
61ee6df
Message:

Fix a couple of stack corruptions in networking code.

Location:
uspace/srv/net
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/net/modules.c

    r61ee6df r7fb2ce3  
    5555
    5656int connect_to_service_timeout( services_t need, suseconds_t timeout ){
    57         int     phone;
    58         int     res;
     57        ipcarg_t phone;
     58        int res;
    5959
    6060        while( true ){
    61                 res = async_req_3_5( PHONE_NS, IPC_M_CONNECT_ME_TO, need, 0, 0, NULL, NULL, NULL, NULL, ( ipcarg_t * ) & phone );
    62                 if(( res >= 0 ) && ( phone >= 0 )){
     61                res = async_req_3_5( PHONE_NS, IPC_M_CONNECT_ME_TO, need, 0, 0, NULL, NULL, NULL, NULL, & phone );
     62                if( res >= 0 ){
    6363                        return phone;
    6464                }
  • uspace/srv/net/socket/socket_client.c

    r61ee6df r7fb2ce3  
    541541        socket_ref              new_socket;
    542542        aid_t                   message_id;
    543         int                             result;
     543        ipcarg_t                ipc_result;
     544        int                     result;
    544545        ipc_call_t              answer;
    545546
     
    592593        ipc_data_read_start( socket->phone, cliaddr, * addrlen );
    593594        fibril_rwlock_write_unlock( & socket_globals.lock );
    594         async_wait_for( message_id, ( ipcarg_t * ) & result );
     595        async_wait_for( message_id, & ipc_result );
     596        result = (int) ipc_result;
    595597        if( result > 0 ){
    596598                if( result != socket_id ){
     
    734736        socket_ref              socket;
    735737        aid_t                   message_id;
    736         int                             result;
     738        ipcarg_t                ipc_result;
     739        int                     result;
    737740        size_t                  fragments;
    738741        size_t *                lengths;
     
    793796                }
    794797        }
    795         async_wait_for( message_id, ( ipcarg_t * ) & result );
     798        async_wait_for( message_id, & ipc_result );
     799        result = (int) ipc_result;
    796800        // if successful
    797801        if( result == EOK ){
  • uspace/srv/net/structures/packet/packet_remote.c

    r61ee6df r7fb2ce3  
    101101        ERROR_DECLARE;
    102102
    103         packet_id_t     packet_id;
     103        ipcarg_t packet_id;
    104104        ipcarg_t size;
    105105        packet_t packet;
    106106
    107         if( ERROR_OCCURRED( async_req_4_2( phone, NET_PACKET_CREATE_4, max_content, addr_len, max_prefix, max_suffix, ( ipcarg_t * ) & packet_id, & size ))){
     107        if( ERROR_OCCURRED( async_req_4_2( phone, NET_PACKET_CREATE_4, max_content, addr_len, max_prefix, max_suffix, & packet_id, & size ))){
    108108                return NULL;
    109109        }
     
    120120        ERROR_DECLARE;
    121121
    122         packet_id_t     packet_id;
     122        ipcarg_t        packet_id;
    123123        ipcarg_t        size;
    124124        packet_t        packet;
    125125
    126         if( ERROR_OCCURRED( async_req_1_2( phone, NET_PACKET_CREATE_1, content, ( ipcarg_t * ) & packet_id, & size ))){
     126        if( ERROR_OCCURRED( async_req_1_2( phone, NET_PACKET_CREATE_1, content, & packet_id, & size ))){
    127127                return NULL;
    128128        }
Note: See TracChangeset for help on using the changeset viewer.