Changeset 984a9ba in mainline for uspace/srv/hid/input/ctl/kbdev.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/srv/hid/input/ctl/kbdev.c

    r76f566d r984a9ba  
    5454static void kbdev_ctl_set_ind(kbd_dev_t *, unsigned int);
    5555
    56 static void kbdev_callback_conn(cap_call_handle_t, ipc_call_t *, void *arg);
     56static void kbdev_callback_conn(ipc_call_t *, void *arg);
    5757
    5858kbd_ctl_ops_t kbdev_ctl = {
     
    147147}
    148148
    149 static void kbdev_callback_conn(cap_call_handle_t icall_handle, ipc_call_t *icall, void *arg)
     149static void kbdev_callback_conn(ipc_call_t *icall, void *arg)
    150150{
    151151        kbdev_t *kbdev;
     
    158158        while (true) {
    159159                ipc_call_t call;
    160                 cap_call_handle_t chandle;
     160                async_get_call(&call);
    161161
    162                 chandle = async_get_call(&call);
    163162                if (!IPC_GET_IMETHOD(call)) {
    164163                        kbdev_destroy(kbdev);
     
    179178                }
    180179
    181                 async_answer_0(chandle, retval);
     180                async_answer_0(&call, retval);
    182181        }
    183182}
Note: See TracChangeset for help on using the changeset viewer.