101 |
|
getInBound("FQDN"); |
102 |
|
_socketOut.println(_socket.getInetAddress().getHostName().toLowerCase()); |
103 |
|
|
104 |
+ |
// try for IP |
105 |
+ |
getInBound("IP"); |
106 |
+ |
_socketOut.println(_socket.getInetAddress().getHostAddress()); |
107 |
+ |
|
108 |
|
// get properties |
109 |
|
String reqProperty = getInBound(); |
110 |
|
while(!reqProperty.equals("ENDCONFIG")) { |
169 |
|
|
170 |
|
// try for {lastModified} |
171 |
|
String lastModified = getInBound(); |
172 |
+ |
long lastmod; |
173 |
+ |
try { |
174 |
+ |
lastmod = Long.parseLong(lastModified); |
175 |
+ |
} |
176 |
+ |
catch(NumberFormatException e) { |
177 |
+ |
_socketOut.println("ERROR"); |
178 |
+ |
throw new IOException("Last Modified invalid: " + e); |
179 |
+ |
} |
180 |
+ |
|
181 |
|
// check to see if a config update has happen |
182 |
< |
boolean newConfig = _configManager.isModified(filelist, Long.parseLong(lastModified)); |
182 |
> |
boolean newConfig = _configManager.isModified(filelist, lastmod); |
183 |
|
if(newConfig) { |
184 |
|
// new config ! |
185 |
|
_socketOut.println("EXPIRED"); |
236 |
|
String inBound = getInBound(); |
237 |
|
// check if it's what we're expecting |
238 |
|
if(!inBound.equals(expected)) { |
239 |
+ |
_socketOut.println("ERROR"); |
240 |
|
throw new IOException("protocol error - expected:"+expected+" got:" + inBound); |
241 |
|
} |
242 |
|
// it should be ok then |