Changeset 984a9ba in mainline for uspace/srv/ns/ns.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/ns/ns.c

    r76f566d r984a9ba  
    4949#include "task.h"
    5050
    51 static void ns_connection(cap_call_handle_t icall_handle, ipc_call_t *icall, void *arg)
     51static void ns_connection(ipc_call_t *icall, void *arg)
    5252{
    5353        ipc_call_t call;
    54         cap_call_handle_t chandle;
    5554        iface_t iface;
    5655        service_t service;
     
    6362                 */
    6463                if (service_clonable(service)) {
    65                         connect_to_clonable(service, iface, icall, icall_handle);
     64                        connect_to_clonable(service, iface, icall);
    6665                } else {
    67                         connect_to_service(service, iface, icall, icall_handle);
     66                        connect_to_service(service, iface, icall);
    6867                }
    6968                return;
    7069        }
    7170
    72         async_answer_0(icall_handle, EOK);
     71        async_answer_0(icall, EOK);
    7372
    7473        while (true) {
    7574                process_pending_conn();
    7675
    77                 chandle = async_get_call(&call);
     76                async_get_call(&call);
    7877                if (!IPC_GET_IMETHOD(call))
    7978                        break;
     
    9493                         */
    9594                        if (service_clonable(service)) {
    96                                 register_clonable(service, phone, &call, chandle);
     95                                register_clonable(service, phone, &call);
    9796                                continue;
    9897                        } else {
     
    107106                        id = (task_id_t)
    108107                            MERGE_LOUP32(IPC_GET_ARG1(call), IPC_GET_ARG2(call));
    109                         wait_for_task(id, &call, chandle);
     108                        wait_for_task(id, &call);
    110109                        continue;
    111110                case NS_ID_INTRO:
     
    121120                }
    122121
    123                 async_answer_0(chandle, retval);
     122                async_answer_0(&call, retval);
    124123        }
    125124
Note: See TracChangeset for help on using the changeset viewer.