X-Git-Url: https://git.hcoop.net/hcoop/domtool2.git/blobdiff_plain/504618b9ccf4bdbd8b3e27f799770b16c6358a71..99cc41443c07f97535eaeecc628d99075ca2cebf:/src/msg.sml?ds=sidebyside diff --git a/src/msg.sml b/src/msg.sml index bbaf24a..a8aea97 100644 --- a/src/msg.sml +++ b/src/msg.sml @@ -225,6 +225,9 @@ fun send (bio, m) = | MsgDropDb {dbtype, dbname} => (OpenSSL.writeInt (bio, 36); OpenSSL.writeString (bio, dbtype); OpenSSL.writeString (bio, dbname)) + | MsgGrantDb {dbtype, dbname} => (OpenSSL.writeInt (bio, 37); + OpenSSL.writeString (bio, dbtype); + OpenSSL.writeString (bio, dbname)) fun checkIt v = case v of @@ -330,6 +333,10 @@ fun recv bio = (SOME dbtype, SOME dbname) => SOME (MsgDropDb {dbtype = dbtype, dbname = dbname}) | _ => NONE) + | 37 => (case (OpenSSL.readString bio, OpenSSL.readString bio) of + (SOME dbtype, SOME dbname) => + SOME (MsgGrantDb {dbtype = dbtype, dbname = dbname}) + | _ => NONE) | _ => NONE) end