Changeset 7048773 in mainline for ns/ns.c


Ignore:
Timestamp:
2006-03-19T12:43:37Z (19 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4c61e60
Parents:
0a862b65
Message:

More IPC added syscall for hangup and some tests.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ns/ns.c

    r0a862b65 r7048773  
    1515        ipcarg_t retval, arg1, arg2;
    1616
    17         printf("Name service started.\n");
     17        printf("NS:Name service started.\n");
    1818        while (1) {
     19                call.taskid = -1;
    1920                callid = ipc_wait_for_call(&call, 0);
    20                 printf("Received call from: %P..%llX\n", &call.taskid,call.taskid);
     21                printf("NS:Call task=%llX,phone=%lX..",
     22                       call.taskid,call.data.phoneid);
    2123                switch (IPC_GET_METHOD(call.data)) {
    22                 case IPC_M_CONNECTTOME:
    23                         printf("Somebody wants to connect with phoneid %zd...accepting\n", IPC_GET_ARG3(call.data));
     24                case IPC_M_PHONE_HUNGUP:
     25                        printf("Phone hung up.\n");
     26                        retval = 0;
     27                        break;
     28                case IPC_M_CONNECT_TO_ME:
     29                        printf("Somebody connecting phid=%zd.\n", IPC_GET_ARG3(call.data));
    2430                        service = IPC_GET_ARG3(call.data);
    2531                        retval = 0;
    2632                        break;
    27                 case IPC_M_CONNECTMETO:
    28                         printf("Somebody wants to connect to: %zd\n",
     33                case IPC_M_CONNECT_ME_TO:
     34                        printf("Connectmeto: %zd\n",
    2935                               IPC_GET_ARG1(call.data));
    3036                        retval = 0;
     
    3743                        arg2 = 0xbeef;
    3844                        break;
     45                case NS_HANGUP:
     46                        printf("Closing connection.\n");
     47                        retval = EHANGUP;
     48                        break;
    3949                case NS_PING_SVC:
    40                         printf("Pinging service %d\n", service);
     50                        printf("NS:Pinging service %d\n", service);
    4151                        ipc_call_sync(service, NS_PING, 0xbeef, 0);
    42                         printf("Got pong\n");
     52                        printf("NS:Got pong\n");
    4353                        break;
    4454                default:
Note: See TracChangeset for help on using the changeset viewer.