Changeset a35b458 in mainline for uspace/srv/ns/ns.c
- Timestamp:
- 2018-03-02T20:10:49Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f1380b7
- Parents:
- 3061bc1
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:38:31)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-02 20:10:49)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/ns/ns.c
r3061bc1 ra35b458 69 69 return; 70 70 } 71 71 72 72 async_answer_0(iid, EOK); 73 73 74 74 while (true) { 75 75 process_pending_conn(); 76 76 77 77 callid = async_get_call(&call); 78 78 if (!IPC_GET_IMETHOD(call)) 79 79 break; 80 80 81 81 task_id_t id; 82 82 errno_t retval; 83 83 84 84 service_t service; 85 85 sysarg_t phone; 86 86 87 87 switch (IPC_GET_IMETHOD(call)) { 88 88 case NS_REGISTER: 89 89 service = IPC_GET_ARG1(call); 90 90 phone = IPC_GET_ARG5(call); 91 91 92 92 /* 93 93 * Server requests service registration. … … 99 99 retval = register_service(service, phone, &call); 100 100 } 101 101 102 102 break; 103 103 case NS_PING: … … 120 120 break; 121 121 } 122 122 123 123 async_answer_0(callid, retval); 124 124 } … … 130 130 { 131 131 printf("%s: HelenOS IPC Naming Service\n", NAME); 132 132 133 133 errno_t rc = service_init(); 134 134 if (rc != EOK) 135 135 return rc; 136 136 137 137 rc = clonable_init(); 138 138 if (rc != EOK) 139 139 return rc; 140 140 141 141 rc = task_init(); 142 142 if (rc != EOK) 143 143 return rc; 144 144 145 145 async_set_fallback_port_handler(ns_connection, NULL); 146 146 147 147 printf("%s: Accepting connections\n", NAME); 148 148 async_manager(); 149 149 150 150 /* Not reached */ 151 151 return 0;
Note:
See TracChangeset
for help on using the changeset viewer.