Ignore:
File:
1 edited

Legend:

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

    readaeae8 r8e3153b  
    4242static int request_process(call_t *call, answerbox_t *box)
    4343{
    44         cap_phone_handle_t phone_handle;
     44        cap_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,
    49             (rc == EOK) ? CAP_HANDLE_RAW(phone_handle) : CAP_NIL);
     48        IPC_SET_ARG5(call->data, (rc == EOK) ? phone_handle : -1);
    5049        return 0;
    5150}
     
    5352static errno_t answer_cleanup(call_t *answer, ipc_data_t *olddata)
    5453{
    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);
    5655        kobject_t *phone_obj = (kobject_t *) answer->priv;
    5756
    58         if (CAP_HANDLE_VALID(phone_handle)) {
     57        if (phone_handle >= 0) {
    5958                kobject_put(phone_obj);
    6059                cap_free(TASK, phone_handle);
     
    6665static errno_t answer_preprocess(call_t *answer, ipc_data_t *olddata)
    6766{
    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);
    6968        kobject_t *phone_obj = (kobject_t *) answer->priv;
    7069
     
    7271                /* The connection was not accepted */
    7372                answer_cleanup(answer, olddata);
    74         } else if (CAP_HANDLE_VALID(phone_handle)) {
     73        } else if (phone_handle >= 0) {
    7574                /*
    7675                 * The connection was accepted
Note: See TracChangeset for help on using the changeset viewer.