in src/main/java/org/openvasp/host/service/impl/VaspServiceImpl.java [165:188]
public TransferEntity sendTransferReply(final int transferId, @NonNull final String responseCode) {
val transferEntity = transferService.getById(transferId);
checkTransferType(transferEntity, TransferType.INCOMING);
checkTransferStatus(transferEntity, TransferStatus.TRANSFER_REQUESTED);
val message = new TransferReply();
message.getHeader().setResponseCode(responseCode);
if ("1".equals(responseCode)) {
message.setDestinationAddress(transferEntity.getDestAddr());
}
val session = getBeneficiarySession(transferEntity.getSessionId());
session.sendMessage(message);
saveSession(session);
transferEntity.setTransferReplyCode(Integer.valueOf(responseCode));
transferEntity.setTrStatus("1".equals(responseCode)
? TransferStatus.TRANSFER_ALLOWED
: TransferStatus.TRANSFER_FORBIDDEN);
return transferService.save(transferEntity);
}