Changes in kernel/generic/src/ipc/ops/concttome.c [eadaeae8:8e3153b] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/ipc/ops/concttome.c
readaeae8 r8e3153b 42 42 static int request_process(call_t *call, answerbox_t *box) 43 43 { 44 cap_ phone_handle_t phone_handle;44 cap_handle_t phone_handle; 45 45 kobject_t *phone_obj; 46 46 errno_t rc = phone_alloc(TASK, false, &phone_handle, &phone_obj); 47 47 call->priv = (sysarg_t) phone_obj; 48 IPC_SET_ARG5(call->data, 49 (rc == EOK) ? CAP_HANDLE_RAW(phone_handle) : CAP_NIL); 48 IPC_SET_ARG5(call->data, (rc == EOK) ? phone_handle : -1); 50 49 return 0; 51 50 } … … 53 52 static errno_t answer_cleanup(call_t *answer, ipc_data_t *olddata) 54 53 { 55 cap_ phone_handle_t phone_handle = (cap_handle_t) IPC_GET_ARG5(*olddata);54 cap_handle_t phone_handle = (cap_handle_t) IPC_GET_ARG5(*olddata); 56 55 kobject_t *phone_obj = (kobject_t *) answer->priv; 57 56 58 if ( CAP_HANDLE_VALID(phone_handle)) {57 if (phone_handle >= 0) { 59 58 kobject_put(phone_obj); 60 59 cap_free(TASK, phone_handle); … … 66 65 static errno_t answer_preprocess(call_t *answer, ipc_data_t *olddata) 67 66 { 68 cap_ phone_handle_t phone_handle = (cap_handle_t) IPC_GET_ARG5(*olddata);67 cap_handle_t phone_handle = (cap_handle_t) IPC_GET_ARG5(*olddata); 69 68 kobject_t *phone_obj = (kobject_t *) answer->priv; 70 69 … … 72 71 /* The connection was not accepted */ 73 72 answer_cleanup(answer, olddata); 74 } else if ( CAP_HANDLE_VALID(phone_handle)) {73 } else if (phone_handle >= 0) { 75 74 /* 76 75 * The connection was accepted
Note:
See TracChangeset
for help on using the changeset viewer.