Move domain decription to client side; add some more describers
[hcoop/domtool2.git] / src / main.sml
index ec795e3..15a5853 100644 (file)
@@ -873,21 +873,6 @@ fun requestFirewall {node, uname} =
        before OpenSSL.close bio
     end
 
-fun requestDescribe dom =
-    let
-       val (_, bio) = requestBio (fn () => ())
-    in
-       Msg.send (bio, MsgDescribe dom);
-       case Msg.recv bio of
-           NONE => print "Server closed connection unexpectedly.\n"
-         | SOME m =>
-           case m of
-               MsgDescription s => print s
-             | MsgError s => print ("Describe failed: " ^ s ^ "\n")
-             | _ => print "Unexpected server reply.\n";
-       OpenSSL.close bio
-    end
-
 fun regenerateEither tc checker context =
     let
        fun ifReal f =
@@ -1432,16 +1417,6 @@ fun service () =
                                                      SOME "Script execution failed."))
                                      (fn () => ())
 
-                              | MsgDescribe dom =>
-                                doIt (fn () => (if Domain.validDomain dom then
-                                                    (Msg.send (bio, MsgDescription (Domain.describe dom));
-                                                     ("Requested description of domain " ^ dom,
-                                                      NONE))
-                                                else
-                                                    ("Requested description of invalid domain " ^ dom,
-                                                     SOME "Invalid domain name")))
-                                     (fn () => ())
-
                               | _ =>
                                 doIt (fn () => ("Unexpected command",
                                                 SOME "Unexpected command"))