Rev 2892 | Rev 3424 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2892 | Rev 3011 | ||
---|---|---|---|
Line 242... | Line 242... | ||
242 | /* The recipient agreed to send data. */ |
242 | /* The recipient agreed to send data. */ |
243 | uintptr_t src = IPC_GET_ARG1(answer->data); |
243 | uintptr_t src = IPC_GET_ARG1(answer->data); |
244 | uintptr_t dst = IPC_GET_ARG1(*olddata); |
244 | uintptr_t dst = IPC_GET_ARG1(*olddata); |
245 | size_t max_size = IPC_GET_ARG2(*olddata); |
245 | size_t max_size = IPC_GET_ARG2(*olddata); |
246 | size_t size = IPC_GET_ARG2(answer->data); |
246 | size_t size = IPC_GET_ARG2(answer->data); |
247 | if (size <= max_size) { |
247 | if (size && size <= max_size) { |
248 | /* |
248 | /* |
249 | * Copy the destination VA so that this piece of |
249 | * Copy the destination VA so that this piece of |
250 | * information is not lost. |
250 | * information is not lost. |
251 | */ |
251 | */ |
252 | IPC_SET_ARG1(answer->data, dst); |
252 | IPC_SET_ARG1(answer->data, dst); |
Line 257... | Line 257... | ||
257 | if (rc) { |
257 | if (rc) { |
258 | IPC_SET_RETVAL(answer->data, rc); |
258 | IPC_SET_RETVAL(answer->data, rc); |
259 | free(answer->buffer); |
259 | free(answer->buffer); |
260 | answer->buffer = NULL; |
260 | answer->buffer = NULL; |
261 | } |
261 | } |
- | 262 | } else if (!size) { |
|
- | 263 | IPC_SET_RETVAL(answer->data, EOK); |
|
262 | } else { |
264 | } else { |
263 | IPC_SET_RETVAL(answer->data, ELIMIT); |
265 | IPC_SET_RETVAL(answer->data, ELIMIT); |
264 | } |
266 | } |
265 | } |
267 | } |
266 | } else if (IPC_GET_METHOD(*olddata) == IPC_M_DATA_WRITE) { |
268 | } else if (IPC_GET_METHOD(*olddata) == IPC_M_DATA_WRITE) { |