Fix unintentional punning of masterNode and dispatcherName
authorClinton Ebadi <clinton@unknownlamer.org>
Sat, 14 Jul 2012 23:45:38 +0000 (19:45 -0400)
committerClinton Ebadi <clinton@unknownlamer.org>
Sat, 14 Jul 2012 23:45:38 +0000 (19:45 -0400)
* masterNode is the DNS master, not the domtool dispatcher, but it was
  overloaded
* Luckily, there is a dispatcherName and a simple substitution fixes it

src/main.sml

index c95ef31..9463ce2 100644 (file)
@@ -753,7 +753,7 @@ fun requestMysqlFixperms () =
 fun requestApt {node, pkg} =
     let
        val (user, context) = requestContext (fn () => ())
-       val bio = OpenSSL.connect true (context, if node = Config.masterNode then
+       val bio = OpenSSL.connect true (context, if node = Config.dispatcherName then
                                                     dispatcher
                                                 else
                                                     Domain.nodeIp node ^ ":" ^ Int.toString Config.slavePort)
@@ -782,7 +782,7 @@ fun requestApt {node, pkg} =
 fun requestCron {node, uname} =
     let
        val (user, context) = requestContext (fn () => ())
-       val bio = OpenSSL.connect true (context, if node = Config.masterNode then
+       val bio = OpenSSL.connect true (context, if node = Config.dispatcherName then
                                                     dispatcher
                                                 else
                                                     Domain.nodeIp node ^ ":" ^ Int.toString Config.slavePort)
@@ -811,7 +811,7 @@ fun requestCron {node, uname} =
 fun requestFtp {node, uname} =
     let
        val (user, context) = requestContext (fn () => ())
-       val bio = OpenSSL.connect true (context, if node = Config.masterNode then
+       val bio = OpenSSL.connect true (context, if node = Config.dispatcherName then
                                                     dispatcher
                                                 else
                                                     Domain.nodeIp node ^ ":" ^ Int.toString Config.slavePort)
@@ -840,7 +840,7 @@ fun requestFtp {node, uname} =
 fun requestTrustedPath {node, uname} =
     let
        val (user, context) = requestContext (fn () => ())
-       val bio = OpenSSL.connect true (context, if node = Config.masterNode then
+       val bio = OpenSSL.connect true (context, if node = Config.dispatcherName then
                                                     dispatcher
                                                 else
                                                     Domain.nodeIp node ^ ":" ^ Int.toString Config.slavePort)
@@ -869,7 +869,7 @@ fun requestTrustedPath {node, uname} =
 fun requestSocketPerm {node, uname} =
     let
        val (user, context) = requestContext (fn () => ())
-       val bio = OpenSSL.connect true (context, if node = Config.masterNode then
+       val bio = OpenSSL.connect true (context, if node = Config.dispatcherName then
                                                     dispatcher
                                                 else
                                                     Domain.nodeIp node ^ ":" ^ Int.toString Config.slavePort)
@@ -900,7 +900,7 @@ fun requestSocketPerm {node, uname} =
 fun requestFirewall {node, uname} =
     let
        val (user, context) = requestContext (fn () => ())
-       val bio = OpenSSL.connect true (context, if node = Config.masterNode then
+       val bio = OpenSSL.connect true (context, if node = Config.dispatcherName then
                                                     dispatcher
                                                 else
                                                     Domain.nodeIp node ^ ":" ^ Int.toString Config.slavePort)