int id = getInt(parameters);
String response = getServerVersionById(serverName, id);
toReturn = response.getBytes();
} else {
log.error("Unknown operation: " + operation);
return new Response(Connection.TPFAIL, 0, null, 0);
}
X_OCTET buffer = (X_OCTET) svcinfo.getConnection().tpalloc(
"X_OCTET", null, toReturn.length);
buffer.setByteArray(toReturn);
log.debug("Responding");
return new Response(Connection.TPSUCCESS, 0, buffer, 0);
} catch (ConnectionException e) {
return new Response(Connection.TPFAIL, 0, null, 0);
} catch (IOException e) {
return new Response(Connection.TPFAIL, 0, null, 0);
}
}