Changeset 745 for trunk/server/source4/nbt_server/interfaces.c
- Timestamp:
- Nov 27, 2012, 4:43:17 PM (13 years ago)
- Location:
- trunk/server
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/server
- Property svn:mergeinfo changed
/vendor/current merged: 581,587,591,594,597,600,615,618,740
- Property svn:mergeinfo changed
-
trunk/server/source4/nbt_server/interfaces.c
r414 r745 30 30 #include "lib/socket/netif.h" 31 31 #include "param/param.h" 32 #include "lib/util/util_net.h" 32 33 33 34 … … 186 187 187 188 /* listen for broadcasts on port 137 */ 188 bcast_nbtsock = nbt_name_socket_init(iface, nbtsrv->task->event_ctx , lp_iconv_convenience(nbtsrv->task->lp_ctx));189 bcast_nbtsock = nbt_name_socket_init(iface, nbtsrv->task->event_ctx); 189 190 if (!bcast_nbtsock) { 190 191 talloc_free(iface); … … 193 194 194 195 bcast_address = socket_address_from_strings(bcast_nbtsock, bcast_nbtsock->sock->backend_name, 195 bcast, lp _nbt_port(lp_ctx));196 bcast, lpcfg_nbt_port(lp_ctx)); 196 197 if (!bcast_address) { 197 198 talloc_free(iface); … … 202 203 if (!NT_STATUS_IS_OK(status)) { 203 204 DEBUG(0,("Failed to bind to %s:%d - %s\n", 204 bcast, lp _nbt_port(lp_ctx), nt_errstr(status)));205 bcast, lpcfg_nbt_port(lp_ctx), nt_errstr(status))); 205 206 talloc_free(iface); 206 207 return status; … … 212 213 213 214 /* listen for unicasts on port 137 */ 214 iface->nbtsock = nbt_name_socket_init(iface, nbtsrv->task->event_ctx, 215 lp_iconv_convenience(nbtsrv->task->lp_ctx)); 215 iface->nbtsock = nbt_name_socket_init(iface, nbtsrv->task->event_ctx); 216 216 if (!iface->nbtsock) { 217 217 talloc_free(iface); … … 221 221 unicast_address = socket_address_from_strings(iface->nbtsock, 222 222 iface->nbtsock->sock->backend_name, 223 bind_address, lp _nbt_port(lp_ctx));223 bind_address, lpcfg_nbt_port(lp_ctx)); 224 224 225 225 status = socket_listen(iface->nbtsock->sock, unicast_address, 0, 0); 226 226 if (!NT_STATUS_IS_OK(status)) { 227 227 DEBUG(0,("Failed to bind to %s:%d - %s\n", 228 bind_address, lp _nbt_port(lp_ctx), nt_errstr(status)));228 bind_address, lpcfg_nbt_port(lp_ctx), nt_errstr(status))); 229 229 talloc_free(iface); 230 230 return status; … … 284 284 /* if we are allowing incoming packets from any address, then 285 285 we also need to bind to the wildcard address */ 286 if (!lp _bind_interfaces_only(lp_ctx)) {286 if (!lpcfg_bind_interfaces_only(lp_ctx)) { 287 287 const char *primary_address; 288 288 … … 294 294 } else { 295 295 primary_address = inet_ntoa(interpret_addr2( 296 lp _netbios_name(lp_ctx)));296 lpcfg_netbios_name(lp_ctx))); 297 297 } 298 298 primary_address = talloc_strdup(tmp_ctx, primary_address); … … 319 319 netmask = talloc_strdup(tmp_ctx, iface_n_netmask(ifaces, i)); 320 320 321 status = nbtd_add_socket(nbtsrv, lp_ctx, 321 status = nbtd_add_socket(nbtsrv, lp_ctx, 322 322 address, address, bcast, netmask); 323 323 NT_STATUS_NOT_OK_RETURN(status); 324 324 } 325 325 326 if (lp _wins_server_list(lp_ctx)) {326 if (lpcfg_wins_server_list(lp_ctx)) { 327 327 status = nbtd_add_wins_socket(nbtsrv); 328 328 NT_STATUS_NOT_OK_RETURN(status);
Note:
See TracChangeset
for help on using the changeset viewer.