      for (; t != end; ++t) {
  	if (rare(prev.size() > 255))
  	    prev.resize(255);
-@@ -721,12 +804,15 @@ RemoteServer::msg_openmetadatakeylist(const string & message)
+@@ -721,12 +841,15 @@ RemoteServer::msg_openmetadatakeylist(const string & message)
  	prev = v;
      }
      send_message(REPLY_DONE, string());

 	 i != end; ++i) {
 
 	Xapian::docid newdocid = *i;
@@ -321,52 +307,58 @@ RemoteServer::msg_postlist(const string &message)
     }
 
     send_message(REPLY_DONE, string());
-}
-
-void
-RemoteServer::msg_writeaccess(const string & msg)
-{
-    if (!writable) 
-	throw_read_only();
 
-    wdb = new Xapian::WritableDatabase(context, Xapian::DB_OPEN);
-    delete db;
-    db = wdb;

-    wdb->remove_spelling(string(p, p_end - p), freqdec);
+    wdb_->remove_spelling(string(p, p_end - p), freqdec);
+    release_db(wdb_);
+}
+
+void
+RemoteProtocol::msg_shutdown(const string &)
+{
+	shutdown();
+}
+
+
