Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/ipc/ops/concttome.c

    r8e3153b readaeae8  
    4242static int request_process(call_t *call, answerbox_t *box)
    4343{
    44         cap_handle_t phone_handle;
     44        cap_phone_handle_t phone_handle;
    4545        kobject_t *phone_obj;
    4646        errno_t rc = phone_alloc(TASK, false, &phone_handle, &phone_obj);
    4747        call->priv = (sysarg_t) phone_obj;
    48         IPC_SET_ARG5(call->data, (rc == EOK) ? phone_handle : -1);
     48        IPC_SET_ARG5(call->data,
     49            (rc == EOK) ? CAP_HANDLE_RAW(phone_handle) : CAP_NIL);
    4950        return 0;
    5051}
     
    5253static errno_t answer_cleanup(call_t *answer, ipc_data_t *olddata)
    5354{
    54         cap_handle_t phone_handle = (cap_handle_t) IPC_GET_ARG5(*olddata);
     55        cap_phone_handle_t phone_handle = (cap_handle_t) IPC_GET_ARG5(*olddata);
    5556        kobject_t *phone_obj = (kobject_t *) answer->priv;
    5657
    57         if (phone_handle >= 0) {
     58        if (CAP_HANDLE_VALID(phone_handle)) {
    5859                kobject_put(phone_obj);
    5960                cap_free(TASK, phone_handle);
     
    6566static errno_t answer_preprocess(call_t *answer, ipc_data_t *olddata)
    6667{
    67         cap_handle_t phone_handle = (cap_handle_t) IPC_GET_ARG5(*olddata);
     68        cap_phone_handle_t phone_handle = (cap_handle_t) IPC_GET_ARG5(*olddata);
    6869        kobject_t *phone_obj = (kobject_t *) answer->priv;
    6970
     
    7172                /* The connection was not accepted */
    7273                answer_cleanup(answer, olddata);
    73         } else if (phone_handle >= 0) {
     74        } else if (CAP_HANDLE_VALID(phone_handle)) {
    7475                /*
    7576                 * The connection was accepted
Note: See TracChangeset for help on using the changeset viewer.