* otherwise
*/
public static boolean sendEnquireLink(Session session) {
boolean valid = false;
if (session != null) {
EnquireLinkResp enquireResp = null;
try {
enquireResp = session.enquireLink();
} catch (SmppException e) {
LOGGER.error("SmppException while sending EnquireLink PDU", e);
} catch (IOException e) {
LOGGER.error("IOException while sending EnquireLink PDU", e);
}
if (enquireResp != null) {
valid = enquireResp.getCommandStatus() == Data.ESME_ROK;
if (!valid) {
LOGGER.warn("Unexpected response to EnquireLink PDU: " +
enquireResp.debugString());
}
} else {
LOGGER.error("No response to the EnquireLink PDU - may be " +
"communicating asynchronously or the session " +
"may be invalid");