165 |
|
|
166 |
|
// try for {lastModified} |
167 |
|
String lastModified = getInBound(); |
168 |
+ |
long lastmod; |
169 |
+ |
try { |
170 |
+ |
lastmod = Long.parseLong(lastModified); |
171 |
+ |
} |
172 |
+ |
catch(NumberFormatException e) { |
173 |
+ |
_socketOut.println("ERROR"); |
174 |
+ |
throw new IOException("Last Modified invalid: " + e); |
175 |
+ |
} |
176 |
+ |
|
177 |
|
// check to see if a config update has happen |
178 |
< |
boolean newConfig = _configManager.isModified(filelist, Long.parseLong(lastModified)); |
178 |
> |
boolean newConfig = _configManager.isModified(filelist, lastmod); |
179 |
|
if(newConfig) { |
180 |
|
// new config ! |
181 |
< |
_socketOut.println("ERROR"); |
181 |
> |
_socketOut.println("EXPIRED"); |
182 |
|
} |
183 |
|
else { |
184 |
|
// nothing has changed |
232 |
|
String inBound = getInBound(); |
233 |
|
// check if it's what we're expecting |
234 |
|
if(!inBound.equals(expected)) { |
235 |
+ |
_socketOut.println("ERROR"); |
236 |
|
throw new IOException("protocol error - expected:"+expected+" got:" + inBound); |
237 |
|
} |
238 |
|
// it should be ok then |