private void sendGenericNack ( Pdu packet ) { GenericNack genericNack = new GenericNack ( ) ; genericNack . setSequenceNumber ( packet . getSequenceNumber ( ) ) ; genericNack . setCommandStatus ( SmppConstants . STATUS_INVCMDID ) ; ChannelBuffer buffer = null ; try { buffer = transcoder . encode ( genericNack ) ; } catch ( UnrecoverablePduException e ) { logger . error ( "Encode error: " , e ) ; } catch ( RecoverablePduException e ) { logger . error ( "Encode error: " , e ) ; } if ( logger . isDebugEnabled ( ) ) logger . debug ( "LB sent generic_nack response for packet (" + packet + ") to " + channel . getRemoteAddress ( ) . toString ( ) + ". session ID : " + sessionId ) ; channel . write ( buffer ) ; }
Send generic_nack to client if unable to convert request from client