Changeset f9b2cb4c in mainline for uspace/srv/logger/main.c
- Timestamp:
- 2015-08-23T12:50:23Z (9 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9ef495f
- Parents:
- 0dd16778
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/logger/main.c
r0dd16778 rf9b2cb4c 48 48 #include "logger.h" 49 49 50 static void connection_handler(ipc_callid_t iid, ipc_call_t *icall, void *arg) 50 static void connection_handler_control(ipc_callid_t iid, ipc_call_t *icall, 51 void *arg) 51 52 { 52 logger_interface_t iface = IPC_GET_ARG1(*icall); 53 logger_connection_handler_control(iid); 54 } 53 55 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 } 56 static void connection_handler_writer(ipc_callid_t iid, ipc_call_t *icall, 57 void *arg) 58 { 59 logger_connection_handler_writer(iid); 65 60 } 66 61 … … 73 68 parse_level_settings(argv[i]); 74 69 } 75 76 async_set_fallback_port_handler(connection_handler, NULL);77 70 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); 79 83 if (rc != EOK) { 80 84 printf(NAME ": failed to register: %s.\n", str_error(rc));
Note:
See TracChangeset
for help on using the changeset viewer.