Changeset bda29b37 in mainline


Ignore:
Timestamp:
2010-10-13T18:46:57Z (14 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f4af048
Parents:
1b44433c
Message:

Remove duplicate icmp_connect_module().

File:
1 edited

Legend:

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

    r1b44433c rbda29b37  
    447447        }
    448448        return ip_send_msg(icmp_globals.ip_phone, -1, packet, SERVICE_ICMP, error);
    449 }
    450 
    451 int icmp_connect_module(services_t service, suseconds_t timeout){
    452         icmp_echo_ref echo_data;
    453         icmp_param_t id;
    454         int index;
    455 
    456         echo_data = (icmp_echo_ref) malloc(sizeof(*echo_data));
    457         if(! echo_data){
    458                 return ENOMEM;
    459         }
    460         // assign a new identifier
    461         fibril_rwlock_write_lock(&icmp_globals.lock);
    462         index = icmp_bind_free_id(echo_data);
    463         if(index < 0){
    464                 free(echo_data);
    465                 fibril_rwlock_write_unlock(&icmp_globals.lock);
    466                 return index;
    467         }else{
    468                 id = echo_data->identifier;
    469                 fibril_rwlock_write_unlock(&icmp_globals.lock);
    470                 // return the echo data identifier as the ICMP phone
    471                 return id;
    472         }
    473449}
    474450
Note: See TracChangeset for help on using the changeset viewer.