Changeset 6a8ce16 in mainline for uspace/srv/ns/ns.c


Ignore:
Timestamp:
2015-08-18T18:00:22Z (10 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
84dc30c
Parents:
abf2dfd
Message:

rename services_t to service_t for consistency
cleanup the naming service code

File:
1 edited

Legend:

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

    rabf2dfd r6a8ce16  
    3838#include <ipc/ipc.h>
    3939#include <ipc/ns.h>
     40#include <ipc/services.h>
    4041#include <stdio.h>
    4142#include <errno.h>
     
    7374                sysarg_t retval;
    7475               
     76                service_t service;
     77                sysarg_t phone;
     78               
    7579                switch (IPC_GET_IMETHOD(call)) {
    7680                case IPC_M_PHONE_HUNGUP:
     
    7882                        break;
    7983                case IPC_M_CONNECT_TO_ME:
     84                        service = IPC_GET_ARG1(call);
     85                        phone = IPC_GET_ARG5(call);
     86                       
    8087                        /*
    8188                         * Server requests service registration.
    8289                         */
    83                         if (service_clonable(IPC_GET_ARG1(call))) {
    84                                 register_clonable(IPC_GET_ARG1(call),
    85                                     IPC_GET_ARG5(call), &call, callid);
     90                        if (service_clonable(service)) {
     91                                register_clonable(service, phone, &call, callid);
    8692                                continue;
    87                         } else {
    88                                 retval = register_service(IPC_GET_ARG1(call),
    89                                     IPC_GET_ARG5(call), &call);
    90                         }
     93                        } else
     94                                retval = register_service(service, phone, &call);
     95                       
    9196                        break;
    9297                case IPC_M_CONNECT_ME_TO:
     98                        service = IPC_GET_ARG1(call);
     99                       
    93100                        /*
    94101                         * Client requests to be connected to a service.
    95102                         */
    96                         if (service_clonable(IPC_GET_ARG1(call))) {
    97                                 connect_to_clonable(IPC_GET_ARG1(call),
    98                                     &call, callid);
     103                        if (service_clonable(service)) {
     104                                connect_to_clonable(service, &call, callid);
    99105                                continue;
    100106                        } else {
    101                                 connect_to_service(IPC_GET_ARG1(call), &call,
    102                                     callid);
     107                                connect_to_service(service, &call, callid);
    103108                                continue;
    104109                        }
Note: See TracChangeset for help on using the changeset viewer.