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

Changeset e1e4192 in mainline for uspace/lib/c/generic/inet.c


Ignore:
Timestamp:
2012-06-03T20:45:58Z (10 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
Branches:
lfn, master
Children:
90478727
Parents:
f7e69f5 (diff), 3123d2a (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

File:
1 edited

Legend:

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

    rf7e69f5 re1e4192  
    4444{
    4545        async_exch_t *exch = async_exchange_begin(inet_sess);
    46 
     46       
    4747        ipc_call_t answer;
    4848        aid_t req = async_send_0(exch, INET_CALLBACK_CREATE, &answer);
    4949        int rc = async_connect_to_me(exch, 0, 0, 0, inet_cb_conn, NULL);
    5050        async_exchange_end(exch);
    51 
     51       
    5252        if (rc != EOK)
    5353                return rc;
    54 
     54       
    5555        sysarg_t retval;
    5656        async_wait_for(req, &retval);
    57         if (retval != EOK)
    58                 return retval;
    59 
    60         return EOK;
     57       
     58        return retval;
    6159}
    6260
    6361static int inet_set_proto(uint8_t protocol)
    6462{
    65         int rc;
    66 
    6763        async_exch_t *exch = async_exchange_begin(inet_sess);
    68         rc = async_req_1_0(exch, INET_SET_PROTO, protocol);
     64        int rc = async_req_1_0(exch, INET_SET_PROTO, protocol);
    6965        async_exchange_end(exch);
    70 
     66       
    7167        return rc;
    7268}
     
    8076        assert(inet_ev_ops == NULL);
    8177        assert(inet_protocol == 0);
    82 
     78       
    8379        rc = loc_service_get_id(SERVICE_NAME_INET, &inet_svc,
    8480            IPC_FLAG_BLOCKING);
    8581        if (rc != EOK)
    8682                return ENOENT;
    87 
     83       
    8884        inet_sess = loc_service_connect(EXCHANGE_SERIALIZE, inet_svc,
    8985            IPC_FLAG_BLOCKING);
    9086        if (inet_sess == NULL)
    9187                return ENOENT;
    92 
     88       
    9389        if (inet_set_proto(protocol) != EOK) {
    9490                async_hangup(inet_sess);
     
    9692                return EIO;
    9793        }
    98 
     94       
    9995        if (inet_callback_create() != EOK) {
    10096                async_hangup(inet_sess);
     
    10298                return EIO;
    10399        }
    104 
     100       
    105101        inet_protocol = protocol;
    106102        inet_ev_ops = ev_ops;
Note: See TracChangeset for help on using the changeset viewer.