Changeset bcd7775 in mainline for uspace/srv/sysman/main.c


Ignore:
Timestamp:
2020-01-09T01:04:58Z (4 years ago)
Author:
Matthieu Riolo <matthieu.riolo@…>
Children:
7959879
Parents:
7fa8589
git-author:
Matthieu Riolo <matthieu.riolo@…> (2020-01-06 04:09:19)
git-committer:
Matthieu Riolo <matthieu.riolo@…> (2020-01-09 01:04:58)
Message:

Correcting sysman handler for ipc calls. The old handler would
wrongly accept a call twice.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/sysman/main.c

    r7fa8589 rbcd7775  
    6969static void sysman_connection(ipc_call_t *icall, void *arg)
    7070{
     71        /* First, accept connection */
    7172        async_accept_0(icall);
    7273
    73         while (true) {
    74                 ipc_call_t call;
    75                 async_get_call(&call);
    76 
    77                 if (!ipc_get_imethod(&call)) {
    78                         async_answer_0(&call, EOK);
    79                         break;
    80                 }
    81 
    82                 sysman_interface_t iface = ipc_get_arg1(&call);
    83                 switch (iface) {
    84                 case SYSMAN_PORT_BROKER:
    85                         sysman_connection_broker(&call);
    86                         break;
    87                 case SYSMAN_PORT_CTL:
    88                         sysman_connection_ctl(&call);
    89                         break;
    90                 default:
    91                         /* Unknown interface */
    92                         async_answer_0(&call, ENOENT);
    93                 }
     74        sysman_interface_t iface = ipc_get_arg2(icall);
     75        switch (iface) {
     76        case SYSMAN_PORT_BROKER:
     77                sysman_connection_broker(icall);
     78                break;
     79        case SYSMAN_PORT_CTL:
     80                sysman_connection_ctl(icall);
     81                break;
     82        default:
     83                /* Unknown interface */
     84                async_answer_0(icall, ENOENT);
    9485        }
    9586}
Note: See TracChangeset for help on using the changeset viewer.