fix user data

This commit is contained in:
Edison Su 2011-06-09 18:04:41 -04:00
parent 897952989a
commit 4a4b03fa01
1 changed files with 2 additions and 2 deletions

View File

@ -112,7 +112,7 @@ public class JettyVmDataServer implements VmDataServer {
resp.setStatus(HttpServletResponse.SC_OK);
String userData = _vmDataServer.getVmDataItem(requester, USER_DATA);
if (userData != null){
resp.getWriter().println();
resp.getWriter().println(userData);
} else {
resp.setStatus(HttpServletResponse.SC_NOT_FOUND);
resp.sendError(HttpServletResponse.SC_NOT_FOUND, "Request not found");
@ -185,7 +185,7 @@ public class JettyVmDataServer implements VmDataServer {
String line = null;
while (( line = input.readLine()) != null){
if (NetUtils.isValidIp(line)) {
_ipVmMap.put(line, dir);
_ipVmMap.put(line, vm);
s_logger.info("Found ip " + line + " for vm " + vm);
} else {
s_logger.info("Invalid ip " + line + " for vm " + vm);