Changeset 984a9ba in mainline for uspace/drv/bus/usb/vhc/conndev.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/drv/bus/usb/vhc/conndev.c

    r76f566d r984a9ba  
    8989/** Default handler for IPC methods not handled by DDF.
    9090 *
    91  * @param fun           Device handling the call.
    92  * @param icall_handle  Call handle.
    93  * @param icall         Call data.
     91 * @param fun   Device handling the call.
     92 * @param icall Call data.
     93 *
    9494 */
    95 void default_connection_handler(ddf_fun_t *fun, cap_call_handle_t icall_handle,
    96     ipc_call_t *icall)
     95void default_connection_handler(ddf_fun_t *fun, ipc_call_t *icall)
    9796{
    9897        vhc_data_t *vhc = ddf_fun_data_get(fun);
     
    104103                errno_t rc = vhc_virtdev_plug(vhc, callback, &plugged_device_handle);
    105104                if (rc != EOK) {
    106                         async_answer_0(icall_handle, rc);
     105                        async_answer_0(icall, rc);
    107106                        async_hangup(callback);
    108107                        return;
    109108                }
    110109
    111                 async_answer_0(icall_handle, EOK);
     110                async_answer_0(icall, EOK);
    112111
    113112                receive_device_name(callback);
     
    116115                    plugged_device_name, plugged_device_handle);
    117116        } else
    118                 async_answer_0(icall_handle, EINVAL);
     117                async_answer_0(icall, EINVAL);
    119118}
    120119
Note: See TracChangeset for help on using the changeset viewer.