Changeset 91b60499 in mainline for kernel/generic/src/ipc/ops/concttome.c
- Timestamp:
- 2017-09-30T06:29:42Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 300f4c4
- Parents:
- d076f16 (diff), 6636fb19 (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
-
kernel/generic/src/ipc/ops/concttome.c
rd076f16 r91b60499 1 1 /* 2 2 * Copyright (c) 2006 Ondrej Palkovsky 3 * Copyright (c) 2012 Jakub Jermar 3 * Copyright (c) 2012 Jakub Jermar 4 4 * All rights reserved. 5 5 * … … 42 42 static int request_process(call_t *call, answerbox_t *box) 43 43 { 44 int phoneid= phone_alloc(TASK);44 cap_handle_t phone_handle = phone_alloc(TASK); 45 45 46 IPC_SET_ARG5(call->data, phone id);46 IPC_SET_ARG5(call->data, phone_handle); 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 cap_handle_t phone_handle = (cap_handle_t) IPC_GET_ARG5(*olddata); 54 54 55 if (phone id>= 0)56 phone_dealloc(phone id);55 if (phone_handle >= 0) 56 phone_dealloc(phone_handle); 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 cap_handle_t phone_handle = (cap_handle_t) 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 (phone id>= 0) {68 } else if (phone_handle >= 0) { 69 69 /* The connection was accepted */ 70 if (phone_connect(phoneid, &answer->sender->answerbox)) { 71 /* Set 'phone hash' as arg5 of response */ 70 if (phone_connect(phone_handle, &answer->sender->answerbox)) { 71 /* Set 'phone hash' as ARG5 of response */ 72 kobject_t *phone_obj = kobject_get(TASK, phone_handle, 73 KOBJECT_TYPE_PHONE); 72 74 IPC_SET_ARG5(answer->data, 73 (sysarg_t) &TASK->phones[phoneid]); 75 (sysarg_t) phone_obj->phone); 76 kobject_put(phone_obj); 74 77 } else { 75 78 /* The answerbox is shutting down. */
Note:
See TracChangeset
for help on using the changeset viewer.