Changeset 17aca1c in mainline for uspace/lib/usbvirt/src/callback.c
- Timestamp:
- 2011-02-04T20:56:52Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0397e5a4, e29e09cf
- Parents:
- e778543 (diff), 0b37882 (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbvirt/src/callback.c
re778543 r17aca1c 54 54 55 55 if (address != device->address) { 56 ipc_answer_0(iid, EADDRNOTAVAIL);56 async_answer_0(iid, EADDRNOTAVAIL); 57 57 return; 58 58 } 59 59 60 60 if ((endpoint < 0) || (endpoint >= USB11_ENDPOINT_MAX)) { 61 ipc_answer_0(iid, EINVAL);61 async_answer_0(iid, EINVAL); 62 62 return; 63 63 } 64 64 65 65 if (expected_len == 0) { 66 ipc_answer_0(iid, EINVAL);66 async_answer_0(iid, EINVAL); 67 67 return; 68 68 } … … 74 74 75 75 if (rc != EOK) { 76 ipc_answer_0(iid, rc);76 async_answer_0(iid, rc); 77 77 return; 78 78 } … … 80 80 rc = device->transaction_setup(device, endpoint, buffer, len); 81 81 82 ipc_answer_0(iid, rc);82 async_answer_0(iid, rc); 83 83 } 84 84 … … 92 92 93 93 if (address != device->address) { 94 ipc_answer_0(iid, EADDRNOTAVAIL);94 async_answer_0(iid, EADDRNOTAVAIL); 95 95 return; 96 96 } 97 97 98 98 if ((endpoint < 0) || (endpoint >= USB11_ENDPOINT_MAX)) { 99 ipc_answer_0(iid, EINVAL);99 async_answer_0(iid, EINVAL); 100 100 return; 101 101 } … … 111 111 112 112 if (rc != EOK) { 113 ipc_answer_0(iid, rc);113 async_answer_0(iid, rc); 114 114 return; 115 115 } … … 122 122 } 123 123 124 ipc_answer_0(iid, rc);124 async_answer_0(iid, rc); 125 125 } 126 126 … … 135 135 136 136 if (address != device->address) { 137 ipc_answer_0(iid, EADDRNOTAVAIL);137 async_answer_0(iid, EADDRNOTAVAIL); 138 138 return; 139 139 } 140 140 141 141 if ((endpoint < 0) || (endpoint >= USB11_ENDPOINT_MAX)) { 142 ipc_answer_0(iid, EINVAL);142 async_answer_0(iid, EINVAL); 143 143 return; 144 144 } … … 157 157 ipc_callid_t callid; 158 158 if (!async_data_read_receive(&callid, &receive_len)) { 159 ipc_answer_0(iid, EINVAL);159 async_answer_0(iid, EINVAL); 160 160 return; 161 161 } … … 166 166 } 167 167 168 ipc_answer_1(iid, rc, len);168 async_answer_1(iid, rc, len); 169 169 } 170 170 … … 174 174 { 175 175 if (device->name == NULL) { 176 ipc_answer_0(iid, ENOENT);176 async_answer_0(iid, ENOENT); 177 177 } 178 178 … … 182 182 size_t accepted_size; 183 183 if (!async_data_read_receive(&callid, &accepted_size)) { 184 ipc_answer_0(iid, EINVAL);184 async_answer_0(iid, EINVAL); 185 185 return; 186 186 } … … 191 191 async_data_read_finalize(callid, device->name, accepted_size); 192 192 193 ipc_answer_1(iid, EOK, accepted_size);193 async_answer_1(iid, EOK, accepted_size); 194 194 } 195 195 … … 197 197 void device_callback_connection(usbvirt_device_t *device, ipc_callid_t iid, ipc_call_t *icall) 198 198 { 199 ipc_answer_0(iid, EOK);199 async_answer_0(iid, EOK); 200 200 201 201 while (true) { … … 206 206 switch (IPC_GET_IMETHOD(call)) { 207 207 case IPC_M_PHONE_HUNGUP: 208 ipc_answer_0(callid, EOK);208 async_answer_0(callid, EOK); 209 209 return; 210 210 … … 226 226 227 227 default: 228 ipc_answer_0(callid, EINVAL);228 async_answer_0(callid, EINVAL); 229 229 break; 230 230 }
Note:
See TracChangeset
for help on using the changeset viewer.