Fork us on GitHub Follow us on Facebook Follow us on Twitter

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


Ignore:
Timestamp:
2010-02-18T10:00:30Z (12 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master
Children:
e326edc
Parents:
b8da2a3 (diff), 91478aa (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge from the networking branch.

File:
1 edited

Legend:

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

    rb8da2a3 rca2d142  
    613613                next_packet = pq_detach( packet );
    614614                length = packet_get_data_length( packet );
    615                 tmp_packet = pq_add( socket_data->incoming, packet, new_sequence_number, length );
    616                 if( ! tmp_packet ){
     615                if( ERROR_OCCURRED( pq_add( & socket_data->incoming, packet, new_sequence_number, length ))){
    617616                        // remove the corrupted packets
    618617                        pq_release( tcp_globals.net_phone, packet_get_id( packet ));
    619618                        pq_release( tcp_globals.net_phone, packet_get_id( next_packet ));
    620619                }else{
    621                         socket_data->incoming = tmp_packet;
    622620                        while( next_packet ){
    623621                                new_sequence_number += length;
     
    939937        packet_t        next;
    940938        packet_t        acknowledged = NULL;
    941         packet_t        first;
    942939        uint32_t        old;
    943940
     
    981978                                        }
    982979                                        // add to acknowledged or release
    983                                         first = pq_add( acknowledged, packet, 0, 0 );
    984                                         if( first ){
    985                                                 acknowledged = first;
    986                                         }else{
     980                                        if( pq_add( & acknowledged, packet, 0, 0 ) != EOK ){
    987981                                                pq_release( tcp_globals.net_phone, packet_get_id( packet ));
    988982                                        }
     
    15081502int     tcp_queue_packet( socket_core_ref socket, tcp_socket_data_ref socket_data, packet_t packet, size_t data_length ){
    15091503        ERROR_DECLARE;
    1510         packet_t                first;
    15111504
    15121505        assert( socket );
     
    15161509        ERROR_PROPAGATE( tcp_queue_prepare_packet( socket, socket_data, packet, data_length ));
    15171510
    1518         first = pq_add( socket_data->outgoing, packet, socket_data->next_outgoing, data_length );
    1519         if( ! first ){
    1520                 return tcp_release_and_return( packet, EINVAL );
    1521         }
    1522         socket_data->outgoing = first;
     1511        if( ERROR_OCCURRED( pq_add( & socket_data->outgoing, packet, socket_data->next_outgoing, data_length ))){
     1512                return tcp_release_and_return( packet, ERROR_CODE );
     1513        }
    15231514        socket_data->next_outgoing += data_length;
    15241515        return EOK;
Note: See TracChangeset for help on using the changeset viewer.