Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/ns.c

    rb1bd89ea rf51b1d3  
    3737#include <async.h>
    3838#include <macros.h>
    39 #include <errno.h>
    4039#include "private/ns.h"
    4140
     
    4948}
    5049
    51 async_sess_t *service_connect(exch_mgmt_t mgmt, services_t service, sysarg_t arg2,
     50async_sess_t *service_connect(exch_mgmt_t mgmt, sysarg_t service, sysarg_t arg2,
    5251    sysarg_t arg3)
    5352{
     
    7372}
    7473
    75 async_sess_t *service_connect_blocking(exch_mgmt_t mgmt, services_t service,
     74async_sess_t *service_connect_blocking(exch_mgmt_t mgmt, sysarg_t service,
    7675    sysarg_t arg2, sysarg_t arg3)
    7776{
     
    8281            async_connect_me_to_blocking(mgmt, exch, service, arg2, arg3);
    8382        async_exchange_end(exch);
    84        
     83
    8584        if (!sess)
    8685                return NULL;
     
    9291         */
    9392        async_sess_args_set(sess, arg2, arg3, 0);
    94        
    95         return sess;
    96 }
    97 
    98 /** Create bidirectional connection with a service
    99  *
    100  * @param[in] service         Service.
    101  * @param[in] arg1            First parameter.
    102  * @param[in] arg2            Second parameter.
    103  * @param[in] arg3            Third parameter.
    104  * @param[in] client_receiver Message receiver.
    105  *
    106  * @return Session to the service.
    107  * @return Other error codes as defined by async_connect_to_me().
    108  *
    109  */
    110 async_sess_t *service_bind(services_t service, sysarg_t arg1, sysarg_t arg2,
    111     sysarg_t arg3, async_client_conn_t client_receiver)
    112 {
    113         /* Connect to the needed service */
    114         async_sess_t *sess =
    115             service_connect_blocking(EXCHANGE_SERIALIZE, service, 0, 0);
    116         if (sess != NULL) {
    117                 /* Request callback connection */
    118                 async_exch_t *exch = async_exchange_begin(sess);
    119                 int rc = async_connect_to_me(exch, arg1, arg2, arg3,
    120                     client_receiver, NULL);
    121                 async_exchange_end(exch);
    122                
    123                 if (rc != EOK) {
    124                         async_hangup(sess);
    125                         errno = rc;
    126                         return NULL;
    127                 }
    128         }
    12993       
    13094        return sess;
Note: See TracChangeset for help on using the changeset viewer.