Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/kbd/generic/kbd.c

    r3f29834 r47a350f  
    6060#define NAMESPACE  "hid_in"
    6161
    62 int client_phone = -1;
     62int phone2cons = -1;
    6363
    6464/** Currently active modifiers. */
     
    164164        ev.c = layout[active_layout]->parse_ev(&ev);
    165165
    166         async_msg_4(client_phone, KBD_EVENT, ev.type, ev.key, ev.mods, ev.c);
    167 }
    168 
    169 static void client_connection(ipc_callid_t iid, ipc_call_t *icall)
     166        async_msg_4(phone2cons, KBD_EVENT, ev.type, ev.key, ev.mods, ev.c);
     167}
     168
     169static void console_connection(ipc_callid_t iid, ipc_call_t *icall)
    170170{
    171171        ipc_callid_t callid;
     
    179179                switch (IPC_GET_METHOD(call)) {
    180180                case IPC_M_PHONE_HUNGUP:
    181                         if (client_phone != -1) {
    182                                 ipc_hangup(client_phone);
    183                                 client_phone = -1;
     181                        if (phone2cons != -1) {
     182                                ipc_hangup(phone2cons);
     183                                phone2cons = -1;
    184184                        }
    185185                       
     
    187187                        return;
    188188                case IPC_M_CONNECT_TO_ME:
    189                         if (client_phone != -1) {
     189                        if (phone2cons != -1) {
    190190                                retval = ELIMIT;
    191191                                break;
    192192                        }
    193                         client_phone = IPC_GET_ARG5(call);
     193                        phone2cons = IPC_GET_ARG5(call);
    194194                        retval = 0;
    195195                        break;
     
    238238       
    239239        /* Register driver */
    240         int rc = devmap_driver_register(NAME, client_connection);
     240        int rc = devmap_driver_register(NAME, console_connection);
    241241        if (rc < 0) {
    242242                printf(NAME ": Unable to register driver (%d)\n", rc);
Note: See TracChangeset for help on using the changeset viewer.