Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset bcd7775 in mainline


Ignore:
Timestamp:
2020-01-09T01:04:58Z (11 months 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.

Location:
uspace/srv/sysman
Files:
3 edited

Legend:

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

    r7fa8589 rbcd7775  
    113113{
    114114        sysman_log(LVL_DEBUG2, "%s", __func__);
    115         /* First, accept connection */
    116         async_answer_0(icall, EOK);
    117115
    118116        while (true) {
  • uspace/srv/sysman/connection_ctl.c

    r7fa8589 rbcd7775  
    295295{
    296296        sysman_log(LVL_DEBUG2, "%s", __func__);
    297         /* First, accept connection */
    298         async_answer_0(icall, EOK);
    299297
    300298        while (true) {
  • 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.