Changeset a46e56b in mainline for uspace/srv/ns/clonable.c


Ignore:
Timestamp:
2018-03-22T06:49:35Z (7 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
77f0a1d
Parents:
3e242d2
git-author:
Jakub Jermar <jakub@…> (2018-03-21 23:29:06)
git-committer:
Jakub Jermar <jakub@…> (2018-03-22 06:49:35)
Message:

Prefer handle over ID in naming handle variables

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/ns/clonable.c

    r3e242d2 ra46e56b  
    4848        service_t service;
    4949        iface_t iface;
    50         cap_call_handle_t callid;
     50        cap_call_handle_t chandle;
    5151        sysarg_t arg3;
    5252} cs_req_t;
     
    7575 */
    7676void register_clonable(service_t service, sysarg_t phone, ipc_call_t *call,
    77     cap_call_handle_t callid)
     77    cap_call_handle_t chandle)
    7878{
    7979        link_t *req_link = list_first(&cs_req);
     
    8181                /* There was no pending connection request. */
    8282                printf("%s: Unexpected clonable server.\n", NAME);
    83                 async_answer_0(callid, EBUSY);
     83                async_answer_0(chandle, EBUSY);
    8484                return;
    8585        }
     
    9191        assert(csr->service == SERVICE_LOADER);
    9292
    93         async_answer_0(callid, EOK);
     93        async_answer_0(chandle, EOK);
    9494
    9595        async_sess_t *sess = async_callback_receive(EXCHANGE_SERIALIZE);
    9696        if (sess == NULL)
    97                 async_answer_0(callid, EIO);
     97                async_answer_0(chandle, EIO);
    9898
    9999        async_exch_t *exch = async_exchange_begin(sess);
    100         async_forward_fast(csr->callid, exch, csr->iface, csr->arg3, 0,
     100        async_forward_fast(csr->chandle, exch, csr->iface, csr->arg3, 0,
    101101            IPC_FF_NONE);
    102102        async_exchange_end(exch);
     
    111111 * @param iface   Interface to be connected to.
    112112 * @param call    Pointer to call structure.
    113  * @param callid  Call ID of the request.
     113 * @param chandle  Call ID of the request.
    114114 *
    115115 * @return Zero on success or a value from @ref errno.h.
     
    117117 */
    118118void connect_to_clonable(service_t service, iface_t iface, ipc_call_t *call,
    119     cap_call_handle_t callid)
     119    cap_call_handle_t chandle)
    120120{
    121121        assert(service == SERVICE_LOADER);
     
    123123        cs_req_t *csr = malloc(sizeof(cs_req_t));
    124124        if (csr == NULL) {
    125                 async_answer_0(callid, ENOMEM);
     125                async_answer_0(chandle, ENOMEM);
    126126                return;
    127127        }
     
    132132        if (rc != EOK) {
    133133                free(csr);
    134                 async_answer_0(callid, rc);
     134                async_answer_0(chandle, rc);
    135135                return;
    136136        }
     
    139139        csr->service = service;
    140140        csr->iface = iface;
    141         csr->callid = callid;
     141        csr->chandle = chandle;
    142142        csr->arg3 = IPC_GET_ARG3(*call);
    143143
Note: See TracChangeset for help on using the changeset viewer.