Changeset aa85487 in mainline for uspace/srv/net/modules.c


Ignore:
Timestamp:
2010-03-07T15:11:56Z (14 years ago)
Author:
Lukas Mejdrech <lukasmejdrech@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
aadf01e
Parents:
2e99277 (diff), 137691a (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 mainline changes, revision 308

File:
1 edited

Legend:

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

    r2e99277 raa85487  
    5555
    5656int connect_to_service_timeout( services_t need, suseconds_t timeout ){
    57         ipcarg_t phone;
    58         int res;
     57        if (timeout <= 0)
     58                return async_connect_me_to_blocking( PHONE_NS, need, 0, 0);
     59       
     60        while( true ){
     61                int phone;
    5962
    60         while( true ){
    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 ){
     63                phone = async_connect_me_to( PHONE_NS, need, 0, 0);
     64                if( (phone >= 0) || (phone != ENOENT) )
    6365                        return phone;
    64                 }
    65                 if( timeout > 0 ){
    66                         timeout -= MODULE_WAIT_TIME;
    67                         if( timeout <= 0 ) return ETIMEOUT;
    68                 }
     66       
     67                timeout -= MODULE_WAIT_TIME;
     68                if( timeout <= 0 ) return ETIMEOUT;
     69
    6970                usleep( MODULE_WAIT_TIME );
    7071        }
     
    8485        if( phone >= 0 ){
    8586                if( ERROR_OCCURRED( ipc_connect_to_me( phone, arg1, arg2, arg3, & phonehash ))){
    86                         async_msg_0( phone, IPC_M_PHONE_HUNGUP );
     87                        ipc_hangup( phone );
    8788                        return ERROR_CODE;
    8889                }
Note: See TracChangeset for help on using the changeset viewer.