summaryrefslogtreecommitdiff
path: root/source4/smb_server
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-08-14 05:56:12 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:57:59 -0500
commit64082214337e2ab50f0a69ca7f9bcf56762129cc (patch)
treebf861a24299291ad3607df0b40b749ae67545960 /source4/smb_server
parent350673b2d0106191e6bdb65772f70cae5abafacb (diff)
downloadsamba-64082214337e2ab50f0a69ca7f9bcf56762129cc.tar.gz
samba-64082214337e2ab50f0a69ca7f9bcf56762129cc.tar.bz2
samba-64082214337e2ab50f0a69ca7f9bcf56762129cc.zip
r1819: changed "smb ports" to be a LIST parameter type in loadparm (its a classic case for a list)
(This used to be commit e53d32c65ab0751b3e01f4f699f5d0e1892369ae)
Diffstat (limited to 'source4/smb_server')
-rw-r--r--source4/smb_server/smb_server.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/source4/smb_server/smb_server.c b/source4/smb_server/smb_server.c
index f679a65287..513011216f 100644
--- a/source4/smb_server/smb_server.c
+++ b/source4/smb_server/smb_server.c
@@ -681,12 +681,11 @@ static void add_socket(struct server_service *service,
struct in_addr *ifip)
{
char *ptr, *tok;
- const char *delim = ", ";
+ char **ports = lp_smb_ports();
+ int i;
- for (tok=strtok_r(lp_smb_ports(), delim, &ptr);
- tok;
- tok=strtok_r(NULL, delim, &ptr)) {
- uint16_t port = atoi(tok);
+ for (i=0;ports[i];i++) {
+ uint16_t port = atoi(ports[i]);
if (port == 0) continue;
service_setup_socket(service, model_ops, socket_ctx, ifip, &port);
}