Ignore:
Timestamp:
2019-08-31T10:45:17Z (5 years ago)
Author:
Matthieu Riolo <matthieu.riolo@…>
Children:
102f641
Parents:
f92b315
git-author:
Matthieu Riolo <matthieu.riolo@…> (2019-08-23 22:04:34)
git-committer:
Matthieu Riolo <matthieu.riolo@…> (2019-08-31 10:45:17)
Message:

Correcting failure from previous merge

The commits from Michal Koutný from the branch system-daemon
where built on a old version of Helenos. Because of this
many types and API functions have changed. This commit
upgrades the merge code

File:
1 edited

Legend:

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

    rf92b315 r241f1985  
    3636#include "sysman.h"
    3737
    38 static void sysman_broker_register(ipc_callid_t iid, ipc_call_t *icall)
     38static void sysman_broker_register(ipc_call_t *icall)
    3939{
    4040        sysman_log(LVL_DEBUG2, "%s", __func__);
    41         async_answer_0(iid, EOK);
     41        async_answer_0(icall, EOK);
    4242        /*
    4343         *  What exactly do here? Similar behavior that has locsrv with
     
    4848}
    4949
    50 static void sysman_ipc_forwarded(ipc_callid_t iid, ipc_call_t *icall)
     50static void sysman_ipc_forwarded(ipc_call_t *icall)
    5151{
    5252        sysman_log(LVL_DEBUG2, "%s", __func__);
    53         async_answer_0(iid, ENOTSUP);
     53        async_answer_0(icall, ENOTSUP);
    5454        // TODO implement
    5555}
    5656
    57 static void sysman_main_exposee_added(ipc_callid_t iid, ipc_call_t *icall)
     57static void sysman_main_exposee_added(ipc_call_t *icall)
    5858{
    5959        char *unit_name = NULL;
     
    7979
    8080finish:
    81         async_answer_0(iid, retval);
     81        async_answer_0(icall, retval);
    8282        free(unit_name);
    8383}
    8484
    85 static void sysman_exposee_added(ipc_callid_t iid, ipc_call_t *icall)
     85static void sysman_exposee_added(ipc_call_t *icall)
    8686{
    8787        char *exposee = NULL;
     
    100100
    101101finish:
    102         async_answer_0(iid, retval);
     102        async_answer_0(icall, retval);
    103103        free(exposee);
    104104}
    105105
    106 static void sysman_exposee_removed(ipc_callid_t iid, ipc_call_t *icall)
     106static void sysman_exposee_removed(ipc_call_t *icall)
    107107{
    108108        sysman_log(LVL_DEBUG2, "%s", __func__);
    109         async_answer_0(iid, ENOTSUP);
     109        async_answer_0(icall, ENOTSUP);
    110110        // TODO implement
    111111}
    112112
    113 void sysman_connection_broker(ipc_callid_t iid, ipc_call_t *icall)
     113void sysman_connection_broker(ipc_call_t *icall)
    114114{
    115115        sysman_log(LVL_DEBUG2, "%s", __func__);
    116116        /* First, accept connection */
    117         async_answer_0(iid, EOK);
     117        async_answer_0(icall, EOK);
    118118
    119119        while (true) {
    120120                ipc_call_t call;
    121                 ipc_callid_t callid = async_get_call(&call);
    122 
    123                 if (!IPC_GET_IMETHOD(call)) {
     121               
     122                if (!async_get_call(&call) || !ipc_get_imethod(&call)) {
    124123                        /* Client disconnected */
    125124                        break;
    126125                }
    127126
    128                 switch (IPC_GET_IMETHOD(call)) {
     127                switch (ipc_get_imethod(&call)) {
    129128                case SYSMAN_BROKER_REGISTER:
    130                         sysman_broker_register(callid, &call);
     129                        sysman_broker_register(&call);
    131130                        break;
    132131                case SYSMAN_BROKER_IPC_FWD:
    133                         sysman_ipc_forwarded(callid, &call);
     132                        sysman_ipc_forwarded(&call);
    134133                        break;
    135134                case SYSMAN_BROKER_MAIN_EXP_ADDED:
    136                         sysman_main_exposee_added(callid, &call);
     135                        sysman_main_exposee_added(&call);
    137136                        break;
    138137                case SYSMAN_BROKER_EXP_ADDED:
    139                         sysman_exposee_added(callid, &call);
     138                        sysman_exposee_added(&call);
    140139                        break;
    141140                case SYSMAN_BROKER_EXP_REMOVED:
    142                         sysman_exposee_removed(callid, &call);
     141                        sysman_exposee_removed(&call);
    143142                        break;
    144143                default:
    145                         async_answer_0(callid, ENOENT);
     144                        async_answer_0(&call, ENOENT);
    146145                }
    147146        }
Note: See TracChangeset for help on using the changeset viewer.