Ignore:
Timestamp:
2012-08-24T22:27:44Z (12 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
20282ef3
Parents:
13dbaa8c
Message:

Add two new sysipc_ops_t members:

  • request_forget()
  • answer_cleanup()

Call these members to perform cleanup at appropriate times.

File:
1 edited

Legend:

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

    r13dbaa8c rb1e6269  
    5555}
    5656
     57static void answer_cleanup(call_t *answer, ipc_data_t *olddata)
     58{
     59        int phoneid = (int) IPC_GET_ARG5(*olddata);
     60
     61        phone_dealloc(phoneid);
     62}
     63
    5764static int answer_preprocess(call_t *answer, ipc_data_t *olddata)
    5865{
     
    6168        if (IPC_GET_RETVAL(answer->data) != EOK) {
    6269                /* The connection was not accepted */
    63                 int phoneid = (int) IPC_GET_ARG5(*olddata);
    64        
    65                 phone_dealloc(phoneid);
     70                answer_cleanup(answer, olddata);
    6671        } else {
    6772                /* The connection was accepted */
     
    7782sysipc_ops_t ipc_m_connect_to_me_ops = {
    7883        .request_preprocess = null_request_preprocess,
     84        .request_forget = null_request_forget,
    7985        .request_process = request_process,
     86        .answer_cleanup = answer_cleanup,
    8087        .answer_preprocess = answer_preprocess,
    8188        .answer_process = null_answer_process,
Note: See TracChangeset for help on using the changeset viewer.