Changeset ff381a7 in mainline for uspace/srv/logger/main.c


Ignore:
Timestamp:
2015-11-02T20:54:19Z (8 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d8513177
Parents:
3feeab2 (diff), 5265eea4 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes.

File:
1 edited

Legend:

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

    r3feeab2 rff381a7  
    4848#include "logger.h"
    4949
    50 static void connection_handler(ipc_callid_t iid, ipc_call_t *icall, void *arg)
     50static void connection_handler_control(ipc_callid_t iid, ipc_call_t *icall,
     51    void *arg)
    5152{
    52         logger_interface_t iface = IPC_GET_ARG1(*icall);
     53        logger_connection_handler_control(iid);
     54}
    5355
    54         switch (iface) {
    55         case LOGGER_INTERFACE_CONTROL:
    56                 logger_connection_handler_control(iid);
    57                 break;
    58         case LOGGER_INTERFACE_WRITER:
    59                 logger_connection_handler_writer(iid);
    60                 break;
    61         default:
    62                 async_answer_0(iid, EINVAL);
    63                 break;
    64         }
     56static void connection_handler_writer(ipc_callid_t iid, ipc_call_t *icall,
     57    void *arg)
     58{
     59        logger_connection_handler_writer(iid);
    6560}
    6661
     
    7368                parse_level_settings(argv[i]);
    7469        }
    75 
    76         async_set_client_connection(connection_handler);
    7770       
    78         int rc = service_register(SERVICE_LOGGER);
     71        port_id_t port;
     72        int rc = async_create_port(INTERFACE_LOGGER_CONTROL,
     73            connection_handler_control, NULL, &port);
     74        if (rc != EOK)
     75                return rc;
     76       
     77        rc = async_create_port(INTERFACE_LOGGER_WRITER,
     78            connection_handler_writer, NULL, &port);
     79        if (rc != EOK)
     80                return rc;
     81       
     82        rc = service_register(SERVICE_LOGGER);
    7983        if (rc != EOK) {
    8084                printf(NAME ": failed to register: %s.\n", str_error(rc));
Note: See TracChangeset for help on using the changeset viewer.