Changeset 1a0fb3f8 in mainline for uspace/srv/net/tl


Ignore:
Timestamp:
2010-01-04T22:47:30Z (16 years ago)
Author:
Lukas Mejdrech <lukasmejdrech@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ede63e4
Parents:
b648ae4
Message:

+ icmp and libsocket timeouting connecting

Location:
uspace/srv/net/tl
Files:
4 edited

Legend:

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

    rb648ae4 r1a0fb3f8  
    4545#include <ipc/services.h>
    4646
     47#include <sys/time.h>
    4748#include <sys/types.h>
    4849
     
    508509}
    509510
    510 int icmp_connect_module( services_t service ){
     511int icmp_connect_module( services_t service, suseconds_t timeout ){
    511512        icmp_echo_ref   echo_data;
    512513        icmp_param_t    id;
  • uspace/srv/net/tl/icmp/icmp_common.c

    rb648ae4 r1a0fb3f8  
    4545#include "icmp_messages.h"
    4646
    47 int icmp_connect_module( services_t service ){
     47int icmp_connect_module( services_t service, suseconds_t timeout ){
    4848        int     phone;
    4949
    50         phone = connect_to_service( SERVICE_ICMP );
     50        phone = connect_to_service_timeout( SERVICE_ICMP, timeout );
    5151        if( phone >= 0 ){
    5252                async_req_0_0( phone, NET_ICMP_INIT );
  • uspace/srv/net/tl/tcp/tcp.c

    rb648ae4 r1a0fb3f8  
    219219        fibril_rwlock_initialize( & tcp_globals.lock );
    220220        fibril_rwlock_write_lock( & tcp_globals.lock );
    221         tcp_globals.icmp_phone = icmp_connect_module( SERVICE_ICMP );
    222         if( tcp_globals.icmp_phone < 0 ){
    223                 return tcp_globals.icmp_phone;
    224         }
     221        tcp_globals.icmp_phone = icmp_connect_module( SERVICE_ICMP, ICMP_CONNECT_TIMEOUT );
    225222        tcp_globals.ip_phone = ip_bind_service( SERVICE_IP, IPPROTO_TCP, SERVICE_TCP, client_connection, tcp_received_msg );
    226223        if( tcp_globals.ip_phone < 0 ){
  • uspace/srv/net/tl/udp/udp.c

    rb648ae4 r1a0fb3f8  
    198198        fibril_rwlock_initialize( & udp_globals.lock );
    199199        fibril_rwlock_write_lock( & udp_globals.lock );
    200         udp_globals.icmp_phone = icmp_connect_module( SERVICE_ICMP );
    201         if( udp_globals.icmp_phone < 0 ){
    202                 return udp_globals.icmp_phone;
    203         }
     200        udp_globals.icmp_phone = icmp_connect_module( SERVICE_ICMP, ICMP_CONNECT_TIMEOUT );
    204201        udp_globals.ip_phone = ip_bind_service( SERVICE_IP, IPPROTO_UDP, SERVICE_UDP, client_connection, udp_received_msg );
    205202        if( udp_globals.ip_phone < 0 ){
Note: See TracChangeset for help on using the changeset viewer.