Changeset 984a9ba in mainline for uspace/lib/c/generic/loc.c


Ignore:
Timestamp:
2018-07-05T09:34:09Z (6 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
63d46341
Parents:
76f566d
Message:

do not expose the call capability handler from the async framework

Keep the call capability handler encapsulated within the async framework
and do not expose it explicitly via its API. Use the pointer to
ipc_call_t as the sole object identifying an IPC call in the code that
uses the async framework.

This plugs a major leak in the abstraction and also simplifies both the
async framework (slightly) and all IPC servers.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/loc.c

    r76f566d r984a9ba  
    5555static async_sess_t *loc_consumer_sess = NULL;
    5656
    57 static void loc_cb_conn(cap_call_handle_t icall_handle, ipc_call_t *icall, void *arg)
     57static void loc_cb_conn(ipc_call_t *icall, void *arg)
    5858{
    5959        while (true) {
    6060                ipc_call_t call;
    61                 cap_call_handle_t chandle = async_get_call(&call);
     61                async_get_call(&call);
    6262
    6363                if (!IPC_GET_IMETHOD(call)) {
     
    7272                        fibril_mutex_unlock(&loc_callback_mutex);
    7373
    74                         async_answer_0(chandle, EOK);
     74                        async_answer_0(&call, EOK);
    7575
    7676                        if (cb_fun != NULL)
     
    7979                        break;
    8080                default:
    81                         async_answer_0(chandle, ENOTSUP);
     81                        async_answer_0(&call, ENOTSUP);
    8282                }
    8383        }
Note: See TracChangeset for help on using the changeset viewer.