Changeset 9b1baac in mainline for uspace/srv/ns/ns.c
- Timestamp:
- 2018-07-18T08:35:42Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0b05082
- Parents:
- edc64c0
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/ns/ns.c
redc64c0 r9b1baac 61 61 * Client requests to be connected to a service. 62 62 */ 63 if ( service_clonable(service)) {64 connect_to_clonable(service, iface, icall);63 if (ns_service_is_clonable(service, iface)) { 64 ns_clonable_forward(service, iface, icall); 65 65 } else { 66 connect_to_service(service, iface, icall);66 ns_service_forward(service, iface, icall); 67 67 } 68 68 69 return; 69 70 } … … 72 73 73 74 while (true) { 74 process_pending_conn();75 ns_pending_conn_process(); 75 76 76 77 async_get_call(&call); … … 82 83 83 84 service_t service; 84 sysarg_t phone;85 85 86 86 switch (IPC_GET_IMETHOD(call)) { 87 87 case NS_REGISTER: 88 88 service = IPC_GET_ARG1(call); 89 phone = IPC_GET_ARG5(call);89 iface = IPC_GET_ARG2(call); 90 90 91 91 /* 92 92 * Server requests service registration. 93 93 */ 94 if ( service_clonable(service)) {95 register_clonable(service, phone,&call);94 if (ns_service_is_clonable(service, iface)) { 95 ns_clonable_register(&call); 96 96 continue; 97 97 } else { 98 retval = register_service(service, phone, &call);98 retval = ns_service_register(service, iface); 99 99 } 100 100 101 break; 102 case NS_REGISTER_BROKER: 103 service = IPC_GET_ARG1(call); 104 retval = ns_service_register_broker(service); 101 105 break; 102 106 case NS_PING: … … 115 119 break; 116 120 default: 117 printf("ns: method not supported\n"); 121 printf("%s: Method not supported (%" PRIun ")\n", 122 NAME, IPC_GET_IMETHOD(call)); 118 123 retval = ENOTSUP; 119 124 break; … … 130 135 printf("%s: HelenOS IPC Naming Service\n", NAME); 131 136 132 errno_t rc = service_init();137 errno_t rc = ns_service_init(); 133 138 if (rc != EOK) 134 139 return rc; 135 140 136 rc = clonable_init();141 rc = ns_clonable_init(); 137 142 if (rc != EOK) 138 143 return rc;
Note:
See TracChangeset
for help on using the changeset viewer.