Changeset 984a9ba in mainline for uspace/srv/ns/clonable.c
- Timestamp:
- 2018-07-05T09:34:09Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 63d46341
- Parents:
- 76f566d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/ns/clonable.c
r76f566d r984a9ba 48 48 service_t service; 49 49 iface_t iface; 50 cap_call_handle_t chandle; 51 sysarg_t arg3; 50 ipc_call_t call; 52 51 } cs_req_t; 53 52 … … 74 73 * 75 74 */ 76 void register_clonable(service_t service, sysarg_t phone, ipc_call_t *call, 77 cap_call_handle_t chandle) 75 void register_clonable(service_t service, sysarg_t phone, ipc_call_t *call) 78 76 { 79 77 link_t *req_link = list_first(&cs_req); … … 81 79 /* There was no pending connection request. */ 82 80 printf("%s: Unexpected clonable server.\n", NAME); 83 async_answer_0(c handle, EBUSY);81 async_answer_0(call, EBUSY); 84 82 return; 85 83 } … … 91 89 assert(csr->service == SERVICE_LOADER); 92 90 93 async_answer_0(c handle, EOK);91 async_answer_0(call, EOK); 94 92 95 93 async_sess_t *sess = async_callback_receive(EXCHANGE_SERIALIZE); 96 94 if (sess == NULL) 97 async_answer_0(c handle, EIO);95 async_answer_0(call, EIO); 98 96 99 97 async_exch_t *exch = async_exchange_begin(sess); 100 async_forward_fast( csr->chandle, exch, csr->iface, csr->arg3, 0,101 IPC_ FF_NONE);98 async_forward_fast(&csr->call, exch, csr->iface, 99 IPC_GET_ARG3(csr->call), 0, IPC_FF_NONE); 102 100 async_exchange_end(exch); 103 101 … … 108 106 /** Connect client to clonable service. 109 107 * 110 * @param service Service to be connected to. 111 * @param iface Interface to be connected to. 112 * @param call Pointer to call structure. 113 * @param chandle Call handle of the request. 108 * @param service Service to be connected to. 109 * @param iface Interface to be connected to. 110 * @param call Pointer to call structure. 114 111 * 115 112 * @return Zero on success or a value from @ref errno.h. 116 113 * 117 114 */ 118 void connect_to_clonable(service_t service, iface_t iface, ipc_call_t *call, 119 cap_call_handle_t chandle) 115 void connect_to_clonable(service_t service, iface_t iface, ipc_call_t *call) 120 116 { 121 117 assert(service == SERVICE_LOADER); … … 123 119 cs_req_t *csr = malloc(sizeof(cs_req_t)); 124 120 if (csr == NULL) { 125 async_answer_0(c handle, ENOMEM);121 async_answer_0(call, ENOMEM); 126 122 return; 127 123 } … … 132 128 if (rc != EOK) { 133 129 free(csr); 134 async_answer_0(c handle, rc);130 async_answer_0(call, rc); 135 131 return; 136 132 } … … 139 135 csr->service = service; 140 136 csr->iface = iface; 141 csr->chandle = chandle; 142 csr->arg3 = IPC_GET_ARG3(*call); 137 csr->call = *call; 143 138 144 139 /*
Note:
See TracChangeset
for help on using the changeset viewer.