Changeset cf3aee19 in mainline for kernel/generic/src/ipc


Ignore:
Timestamp:
2015-06-17T23:45:24Z (11 years ago)
Author:
Michal Koutný <xm.koutny+hos@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
523b17a
Parents:
fc7bf19 (diff), 2654afb (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.
Message:

Sync with mainline

Location:
kernel/generic/src/ipc
Files:
2 edited

Legend:

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

    rfc7bf19 rcf3aee19  
    4444        int newphid = phone_alloc(TASK);
    4545
     46        /* Remember the phoneid or the error. */
     47        call->priv = newphid;
    4648        if (newphid < 0)
    4749                return ELIMIT;
     
    4951        /* Set arg5 for server */
    5052        IPC_SET_ARG5(call->data, (sysarg_t) &TASK->phones[newphid]);
    51         call->priv = newphid;
    5253
    5354        return EOK;
     
    7374static int answer_process(call_t *answer)
    7475{
    75         if (IPC_GET_RETVAL(answer->data))
    76                 phone_dealloc(answer->priv);
    77         else
    78                 IPC_SET_ARG5(answer->data, answer->priv);
     76        int newphid = (int) answer->priv;
     77
     78        if (IPC_GET_RETVAL(answer->data)) {
     79                if (newphid >= 0) {
     80                        /*
     81                         * The phone was indeed allocated and now needs
     82                         * to be deallocated.
     83                         */
     84                        phone_dealloc(newphid);
     85                }
     86        } else {
     87                IPC_SET_ARG5(answer->data, newphid);
     88        }
    7989       
    8090        return EOK;
  • kernel/generic/src/ipc/sysipc.c

    rfc7bf19 rcf3aee19  
    388388{
    389389        call_t *call = get_call(callid);
    390         phone_t *phone;
    391         bool need_old = answer_need_old(call);
    392         bool after_forward = false;
    393         ipc_data_t old;
    394         int rc;
    395 
    396390        if (!call)
    397391                return ENOENT;
    398 
     392       
     393        ipc_data_t old;
     394        bool need_old = answer_need_old(call);
    399395        if (need_old)
    400396                old = call->data;
     397       
     398        bool after_forward = false;
     399        int rc;
     400        phone_t *phone;
    401401       
    402402        if (phone_get(phoneid, &phone) != EOK) {
     
    409409                goto error;
    410410        }
    411 
     411       
    412412        call->flags |= IPC_CALL_FORWARDED;
    413413       
Note: See TracChangeset for help on using the changeset viewer.