Ignore:
File:
1 edited

Legend:

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

    r3e6a98c5 r566992e1  
    4646typedef struct {
    4747        link_t link;
    48         sysarg_t service;
    49         ipc_call_t call;
     48        service_t service;
     49        iface_t iface;
    5050        ipc_callid_t callid;
     51        sysarg_t arg3;
    5152} cs_req_t;
    5253
     
    6162
    6263/** Return true if @a service is clonable. */
    63 bool service_clonable(int service)
     64bool service_clonable(service_t service)
    6465{
    65         return (service == SERVICE_LOAD);
     66        return (service == SERVICE_LOADER);
    6667}
    6768
     
    7374 *
    7475 */
    75 void register_clonable(sysarg_t service, sysarg_t phone, ipc_call_t *call,
     76void register_clonable(service_t service, sysarg_t phone, ipc_call_t *call,
    7677    ipc_callid_t callid)
    7778{
    78         link_t *req_link;
    79 
    80         req_link = list_first(&cs_req);
     79        link_t *req_link = list_first(&cs_req);
    8180        if (req_link == NULL) {
    8281                /* There was no pending connection request. */
     
    9089       
    9190        /* Currently we can only handle a single type of clonable service. */
    92         assert(csr->service == SERVICE_LOAD);
     91        assert(csr->service == SERVICE_LOADER);
    9392       
    9493        ipc_answer_0(callid, EOK);
    9594       
    96         ipc_forward_fast(csr->callid, phone, IPC_GET_ARG2(csr->call),
    97             IPC_GET_ARG3(csr->call), 0, IPC_FF_NONE);
     95        ipc_forward_fast(csr->callid, phone, csr->iface, csr->arg3, 0,
     96            IPC_FF_NONE);
    9897       
    9998        free(csr);
     
    104103 *
    105104 * @param service Service to be connected to.
     105 * @param iface   Interface to be connected to.
    106106 * @param call    Pointer to call structure.
    107107 * @param callid  Call ID of the request.
     
    110110 *
    111111 */
    112 void connect_to_clonable(sysarg_t service, ipc_call_t *call,
     112void connect_to_clonable(service_t service, iface_t iface, ipc_call_t *call,
    113113    ipc_callid_t callid)
    114114{
    115         assert(service == SERVICE_LOAD);
     115        assert(service == SERVICE_LOADER);
    116116       
    117117        cs_req_t *csr = malloc(sizeof(cs_req_t));
     
    132132        link_initialize(&csr->link);
    133133        csr->service = service;
    134         csr->call = *call;
     134        csr->iface = iface;
    135135        csr->callid = callid;
     136        csr->arg3 = IPC_GET_ARG3(*call);
    136137       
    137138        /*
Note: See TracChangeset for help on using the changeset viewer.