Changeset 988 for vendor/current/source4/echo_server
- Timestamp:
- Nov 24, 2016, 1:14:11 PM (9 years ago)
- Location:
- vendor/current/source4/echo_server
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/source4/echo_server/echo_server.c
r740 r988 26 26 /* This defines task_server_terminate */ 27 27 #include "smbd/process_model.h" 28 /* We get load_interface sfrom here */28 /* We get load_interface_list from here */ 29 29 #include "socket/netif.h" 30 30 /* NTSTATUS-related stuff */ … … 32 32 /* tsocket-related functions */ 33 33 #include "lib/tsocket/tsocket.h" 34 #include "libds/common/roles.h" 35 36 NTSTATUS server_service_echo_init(void); 34 37 35 38 /* Structure to hold an echo server socket */ … … 156 159 struct echo_udp_call *call = tevent_req_callback_data(subreq, 157 160 struct echo_udp_call); 158 ssize_t ret;159 161 int sys_errno; 160 162 161 ret =tdgram_sendto_queue_recv(subreq, &sys_errno);163 tdgram_sendto_queue_recv(subreq, &sys_errno); 162 164 163 165 /* … … 196 198 &echo_socket->local_address); 197 199 if (ret != 0) { 198 status = map_nt_error_from_unix (errno);200 status = map_nt_error_from_unix_common(errno); 199 201 return status; 200 202 } … … 211 213 &echo_udp_socket->dgram); 212 214 if (ret != 0) { 213 status = map_nt_error_from_unix (errno);215 status = map_nt_error_from_unix_common(errno); 214 216 DEBUG(0, ("Failed to bind to %s:%u UDP - %s\n", 215 217 address, port, nt_errstr(status))); … … 264 266 model_ops = process_model_startup("single"); 265 267 if (model_ops == NULL) { 266 DEBUG(0, ("Can't find 'single' proces model_ops\n"));268 DEBUG(0, ("Can't find 'single' process model_ops\n")); 267 269 return NT_STATUS_INTERNAL_ERROR; 268 270 } 269 271 270 num_interfaces = iface_ count(ifaces);272 num_interfaces = iface_list_count(ifaces); 271 273 272 274 for(i=0; i<num_interfaces; i++) { 273 const char *address = talloc_strdup(tmp_ctx, iface_ n_ip(ifaces, i));275 const char *address = talloc_strdup(tmp_ctx, iface_list_n_ip(ifaces, i)); 274 276 275 277 status = echo_add_socket(echo, model_ops, "echo", address, ECHO_SERVICE_PORT); … … 302 304 "for domain members", false); 303 305 return; 304 case ROLE_ DOMAIN_CONTROLLER:306 case ROLE_ACTIVE_DIRECTORY_DC: 305 307 /* Yes, we want to run the echo server */ 306 308 break; 307 309 } 308 310 309 load_interface s(task, lpcfg_interfaces(task->lp_ctx), &ifaces);310 311 if (iface_ count(ifaces) == 0) {311 load_interface_list(task, task->lp_ctx, &ifaces); 312 313 if (iface_list_count(ifaces) == 0) { 312 314 task_server_terminate(task, 313 315 "echo: No network interfaces configured", -
vendor/current/source4/echo_server/wscript_build
r740 r988 6 6 init_function='server_service_echo_init', 7 7 deps='samba-hostconfig LIBTSOCKET LIBSAMBA_TSOCKET', 8 local_include=False 8 local_include=False, 9 enabled=bld.AD_DC_BUILD_IS_ENABLED() 9 10 )
Note:
See TracChangeset
for help on using the changeset viewer.