try { TFTPPacket received = bufferedReceive(); final InetAddress recdAddress = received.getAddress(); final int recdPort = received.getPort();
final InetAddress recdAddress = received.getAddress(); if (justStarted) { justStarted = false;
private void fireEvent(TFTPPacket packet) throws Exception { RequestEvent event = new RequestEventImpl(packet, this); try { ra_.fireEvent(event, activity_, packet.getAddress().toString()); } catch (Exception e) { transferTftp_.bufferedSend(new TFTPErrorPacket(packet.getAddress(), packet .getPort(), TFTPErrorPacket.UNDEFINED, e.getMessage())); throw e; } }
private void fireEvent(TFTPPacket packet) throws Exception { RequestEvent event = new RequestEventImpl(packet, this); try { ra_.fireEvent(event, activity_, packet.getAddress().toString()); } catch (Exception e) { transferTftp_.bufferedSend(new TFTPErrorPacket(packet.getAddress(), packet .getPort(), TFTPErrorPacket.UNDEFINED, e.getMessage())); throw e; } }
public void sendError(int errorCode, String reason) { try { if (transferTftp_ != null && transferTftp_.isOpen()) { if (trc.isFineEnabled()) trc.fine(String.format("Send error - code[%d] reason[%s]", errorCode, reason)); transferTftp_.bufferedSend(new TFTPErrorPacket(tftpPacket_.getAddress(), tftpPacket_.getPort(), errorCode, reason)); transferTftp_.endBufferedOps(); } } catch (Exception e) { } shutdown(); }
public void sendError(int errorCode, String reason) { try { if (transferTftp_ != null && transferTftp_.isOpen()) { if (trc.isFineEnabled()) trc.fine(String.format("Send error - code[%d] reason[%s]", errorCode, reason)); transferTftp_.bufferedSend(new TFTPErrorPacket(tftpPacket_.getAddress(), tftpPacket_.getPort(), errorCode, reason)); transferTftp_.endBufferedOps(); } } catch (Exception e) { } shutdown(); }
if(!host.equals(received.getAddress())) host = received.getAddress(); data.setAddress(host); sent.setAddress(host); if (host.equals(received.getAddress()) && received.getPort() == hostPort) error = new TFTPErrorPacket(received.getAddress(), received.getPort(), TFTPErrorPacket.UNKNOWN_TID,
hostPort = received.getPort(); data.setPort(hostPort); if(!host.equals(received.getAddress())) host = received.getAddress(); data.setAddress(host); sent.setAddress(host); if (host.equals(received.getAddress()) && received.getPort() == hostPort) error = new TFTPErrorPacket(received.getAddress(), received.getPort(), TFTPErrorPacket.UNKNOWN_TID,
if(!host.equals(received.getAddress())) host = received.getAddress(); ack.setAddress(host); sent.setAddress(host); if (host.equals(received.getAddress()) && received.getPort() == hostPort) error = new TFTPErrorPacket(received.getAddress(), received.getPort(), TFTPErrorPacket.UNKNOWN_TID,
if(!host.equals(received.getAddress())) host = received.getAddress(); ack.setAddress(host); sent.setAddress(host); if (host.equals(received.getAddress()) && received.getPort() == hostPort) error = new TFTPErrorPacket(received.getAddress(), received.getPort(), TFTPErrorPacket.UNKNOWN_TID,
int timeoutCount = 0; while (!shutdownTransfer && (answer == null || !answer.getAddress().equals(trrp.getAddress()) || answer .getPort() != trrp.getPort())) { transferTftp_.bufferedSend(new TFTPErrorPacket(answer.getAddress(), answer.getPort(), TFTPErrorPacket.UNKNOWN_TID, "Unexpected Host or Port"));
!dataPacket.getAddress().equals(twrp.getAddress()) || dataPacket.getPort() != twrp.getPort())) { transferTftp_.bufferedSend(new TFTPErrorPacket(dataPacket.getAddress(), dataPacket.getPort(), TFTPErrorPacket.UNKNOWN_TID, "Unexpected Host or Port")); (!dataPacket.getAddress().equals(twrp.getAddress()) || dataPacket.getPort() != twrp.getPort())) { .getAddress(), dataPacket.getPort(), TFTPErrorPacket.UNKNOWN_TID, "Unexpected Host or Port"));
int timeoutCount = 0; while (!shutdownTransfer && (answer == null || !answer.getAddress().equals(trrp.getAddress()) || answer .getPort() != trrp.getPort())) { transferTftp_.bufferedSend(new TFTPErrorPacket(answer.getAddress(), answer.getPort(), TFTPErrorPacket.UNKNOWN_TID, "Unexpected Host or Port"));
!dataPacket.getAddress().equals(twrp.getAddress()) || dataPacket.getPort() != twrp.getPort())) { transferTftp_.bufferedSend(new TFTPErrorPacket(dataPacket.getAddress(), dataPacket.getPort(), TFTPErrorPacket.UNKNOWN_TID, "Unexpected Host or Port")); (!dataPacket.getAddress().equals(twrp.getAddress()) || dataPacket.getPort() != twrp.getPort())) { .getAddress(), dataPacket.getPort(), TFTPErrorPacket.UNKNOWN_TID, "Unexpected Host or Port"));