sandbox bug fix

This commit is contained in:
Sida Wang 2017-01-23 11:42:56 -08:00 committed by Sam Ginn
parent ac43e36e5f
commit 3f4d37bf4d
1 changed files with 5 additions and 7 deletions

View File

@ -211,8 +211,9 @@ public class JsonServer {
synchronized (queryLogLock) {
boolean isContext = query.startsWith("(:context ");
if (!sandbox && (!isContext || opts.verbose >= 2)) {
// boolean isContext = query.startsWith("(:context ");
// if (!sandbox && (!isContext || opts.verbose >= 2)) {
if (!sandbox) {
PrintWriter out = IOUtils.openOutAppend(opts.queryLogPath);
out.println(Json.writeValueAsStringHard(jsonMap));
out.close();
@ -226,11 +227,8 @@ public class JsonServer {
Session session = master.getSession(sessionId);
session.remoteHost = remoteHost;
session.format = "json";
//
session.logToFile = sandbox;
if (query == null) query = session.getLastQuery();
if (query == null) query = "";
session.sandbox = sandbox;
if (query == null) query = "null";
logs("Server.handleQuery %s: %s", session.id, query);
// Print header