Changeset 984a9ba in mainline for uspace/srv/logger/ctl.c


Ignore:
Timestamp:
2018-07-05T09:34:09Z (6 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
63d46341
Parents:
76f566d
Message:

do not expose the call capability handler from the async framework

Keep the call capability handler encapsulated within the async framework
and do not expose it explicitly via its API. Use the pointer to
ipc_call_t as the sole object identifying an IPC call in the code that
uses the async framework.

This plugs a major leak in the abstraction and also simplifies both the
async framework (slightly) and all IPC servers.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/logger/ctl.c

    r76f566d r984a9ba  
    6363}
    6464
    65 void logger_connection_handler_control(cap_call_handle_t chandle)
     65void logger_connection_handler_control(ipc_call_t *icall)
    6666{
    6767        errno_t rc;
    6868        int fd;
    6969
    70         async_answer_0(chandle, EOK);
     70        async_answer_0(icall, EOK);
    7171        logger_log("control: new client.\n");
    7272
    7373        while (true) {
    7474                ipc_call_t call;
    75                 cap_call_handle_t chandle = async_get_call(&call);
     75                async_get_call(&call);
    7676
    7777                if (!IPC_GET_IMETHOD(call))
     
    8181                case LOGGER_CONTROL_SET_DEFAULT_LEVEL:
    8282                        rc = set_default_logging_level(IPC_GET_ARG1(call));
    83                         async_answer_0(chandle, rc);
     83                        async_answer_0(&call, rc);
    8484                        break;
    8585                case LOGGER_CONTROL_SET_LOG_LEVEL:
    8686                        rc = handle_log_level_change(IPC_GET_ARG1(call));
    87                         async_answer_0(chandle, rc);
     87                        async_answer_0(&call, rc);
    8888                        break;
    8989                case LOGGER_CONTROL_SET_ROOT:
     
    9393                                vfs_put(fd);
    9494                        }
    95                         async_answer_0(chandle, rc);
     95                        async_answer_0(&call, rc);
    9696                        break;
    9797                default:
    98                         async_answer_0(chandle, EINVAL);
     98                        async_answer_0(&call, EINVAL);
    9999                        break;
    100100                }
Note: See TracChangeset for help on using the changeset viewer.