Changes in uspace/srv/ns/ns.c [1c635d6:9cfbf2f] in mainline


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/ns/ns.c

    r1c635d6 r9cfbf2f  
    3838#include <ipc/ipc.h>
    3939#include <ipc/ns.h>
     40#include <ipc/services.h>
     41#include <abi/ipc/interfaces.h>
    4042#include <stdio.h>
    4143#include <errno.h>
     
    7375                sysarg_t retval;
    7476               
     77                iface_t iface;
     78                service_t service;
     79                sysarg_t phone;
     80               
    7581                switch (IPC_GET_IMETHOD(call)) {
    7682                case IPC_M_PHONE_HUNGUP:
     
    7884                        break;
    7985                case IPC_M_CONNECT_TO_ME:
     86                        service = IPC_GET_ARG2(call);
     87                        phone = IPC_GET_ARG5(call);
     88                       
    8089                        /*
    8190                         * Server requests service registration.
    8291                         */
    83                         if (service_clonable(IPC_GET_ARG1(call))) {
    84                                 register_clonable(IPC_GET_ARG1(call),
    85                                     IPC_GET_ARG5(call), &call, callid);
     92                        if (service_clonable(service)) {
     93                                register_clonable(service, phone, &call, callid);
    8694                                continue;
    87                         } else {
    88                                 retval = register_service(IPC_GET_ARG1(call),
    89                                     IPC_GET_ARG5(call), &call);
    90                         }
     95                        } else
     96                                retval = register_service(service, phone, &call);
     97                       
    9198                        break;
    9299                case IPC_M_CONNECT_ME_TO:
     100                        iface = IPC_GET_ARG1(call);
     101                        service = IPC_GET_ARG2(call);
     102                       
    93103                        /*
    94104                         * Client requests to be connected to a service.
    95105                         */
    96                         if (service_clonable(IPC_GET_ARG1(call))) {
    97                                 connect_to_clonable(IPC_GET_ARG1(call),
    98                                     &call, callid);
     106                        if (service_clonable(service)) {
     107                                connect_to_clonable(service, iface, &call, callid);
    99108                                continue;
    100109                        } else {
    101                                 connect_to_service(IPC_GET_ARG1(call), &call,
    102                                     callid);
     110                                connect_to_service(service, iface, &call, callid);
    103111                                continue;
    104112                        }
Note: See TracChangeset for help on using the changeset viewer.