Ignore:
Timestamp:
2018-07-05T09:34:09Z (7 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/drv/hid/usbhid/multimedia/multimedia.c

    r76f566d r984a9ba  
    7373
    7474
    75 /**
    76  * Default handler for IPC methods not handled by DDF.
     75/** Default handler for IPC methods not handled by DDF.
    7776 *
    7877 * Currently recognizes only one method (IPC_M_CONNECT_TO_ME), in which case it
     
    8079 * later use by the driver to notify about key events.
    8180 *
    82  * @param fun           Device function handling the call.
    83  * @param icall_handle  Call handle.
    84  * @param icall         Call data.
    85  */
    86 static void
    87 default_connection_handler(ddf_fun_t *fun, cap_call_handle_t icall_handle,
    88     ipc_call_t *icall)
     81 * @param fun   Device function handling the call.
     82 * @param icall Call data.
     83 *
     84 */
     85static void default_connection_handler(ddf_fun_t *fun, ipc_call_t *icall)
    8986{
    9087        usb_log_debug(NAME " default_connection_handler()");
     
    9996                        usb_log_debug(NAME " Saved session to console: %p",
    10097                            sess);
    101                         async_answer_0(icall_handle, EOK);
     98                        async_answer_0(icall, EOK);
    10299                } else
    103                         async_answer_0(icall_handle, ELIMIT);
     100                        async_answer_0(icall, ELIMIT);
    104101        } else
    105                 async_answer_0(icall_handle, EINVAL);
     102                async_answer_0(icall, EINVAL);
    106103}
    107104
Note: See TracChangeset for help on using the changeset viewer.