Skip to content

Commit

Permalink
Actually use an array of bind addresses.
Browse files Browse the repository at this point in the history
  • Loading branch information
toots committed Oct 4, 2017
1 parent 8f7fe97 commit 37e78b0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
6 changes: 3 additions & 3 deletions src/harbor/harbor.camlp4
Original file line number Diff line number Diff line change
Expand Up @@ -1051,15 +1051,15 @@ struct
Unix.listen sock max_conn ;
`Read sock
in
let bind_addresses =
let bind_addrs =
List.fold_left (fun cur bind_addr ->
if bind_addr <> "" then
bind_addr :: cur
else cur) [] [conf_harbor_bind_addr#get; conf_harbor_bind_addr6#get]
else cur) [] conf_harbor_bind_addrs#get
in
let (in_s,out_s) = Unix.pipe () in
let events =
`Read in_s :: List.map (open_socket port) bind_addresses
`Read in_s :: List.map (open_socket port) bind_addrs
in
Task.add Tutils.scheduler
{ Task.
Expand Down
9 changes: 3 additions & 6 deletions src/harbor/harbor_base.ml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,9 @@ open Dtools
let conf_harbor =
Conf.void ~p:(Configure.conf#plug "harbor")
"Harbor settings (Icecast/shoutcast stream receiver)."
let conf_harbor_bind_addr =
Conf.string ~p:(conf_harbor#plug "bind_addr") ~d:"0.0.0.0"
"IP address on which the harbor should listen."
let conf_harbor_bind_addr6 =
Conf.string ~p:(conf_harbor#plug "bind_addr6") ~d:""
"IPv6 address on which the harbor should listen. Disabled if empty (default)."
let conf_harbor_bind_addrs =
Conf.list ~p:(conf_harbor#plug "bind_addrs") ~d:["0.0.0.0"]
"IP addresses on which the harbor should listen."
let conf_harbor_max_conn =
Conf.int ~p:(conf_harbor#plug "max_connections") ~d:2
"Maximun of pending source requests per port."
Expand Down

0 comments on commit 37e78b0

Please sign in to comment.