Changeset 05ffb41 in mainline for kernel/generic/src/ipc/ops/concttome.c
- Timestamp:
- 2017-08-17T19:11:14Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1c85bae
- Parents:
- 7e3826d9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/ipc/ops/concttome.c
r7e3826d9 r05ffb41 42 42 static int request_process(call_t *call, answerbox_t *box) 43 43 { 44 int phoneid= phone_alloc(TASK);44 int cap = phone_alloc(TASK); 45 45 46 IPC_SET_ARG5(call->data, phoneid);46 IPC_SET_ARG5(call->data, cap); 47 47 48 48 return EOK; … … 51 51 static int answer_cleanup(call_t *answer, ipc_data_t *olddata) 52 52 { 53 int phoneid= (int) IPC_GET_ARG5(*olddata);53 int cap = (int) IPC_GET_ARG5(*olddata); 54 54 55 if ( phoneid>= 0)56 phone_dealloc( phoneid);55 if (cap >= 0) 56 phone_dealloc(cap); 57 57 58 58 return EOK; … … 61 61 static int answer_preprocess(call_t *answer, ipc_data_t *olddata) 62 62 { 63 int phoneid= (int) IPC_GET_ARG5(*olddata);63 int cap = (int) IPC_GET_ARG5(*olddata); 64 64 65 65 if (IPC_GET_RETVAL(answer->data) != EOK) { 66 66 /* The connection was not accepted */ 67 67 answer_cleanup(answer, olddata); 68 } else if ( phoneid>= 0) {68 } else if (cap >= 0) { 69 69 /* The connection was accepted */ 70 if (phone_connect( phoneid, &answer->sender->answerbox)) {70 if (phone_connect(cap, &answer->sender->answerbox)) { 71 71 /* Set 'phone hash' as arg5 of response */ 72 72 IPC_SET_ARG5(answer->data, 73 (sysarg_t) &TASK->phones[phoneid]);73 (sysarg_t) phone_get_current(cap)); 74 74 } else { 75 75 /* The answerbox is shutting down. */
Note:
See TracChangeset
for help on using the changeset viewer.