use of com.zx.sms.codec.smpp.TlvConvertException in project SMSGate by Lihuanghe.
the class SMPPSessionLoginManager method validServermsg.
@Override
protected int validServermsg(Object message) {
if (message instanceof BaseBindResp) {
BaseBindResp resp = (BaseBindResp) message;
Tlv scInterfaceVersion = resp.getOptionalParameter(SmppConstants.TAG_SC_INTERFACE_VERSION);
if (scInterfaceVersion != null) {
try {
byte tempInterfaceVersion = scInterfaceVersion.getValueAsByte();
logger.info("Server support version : {}", tempInterfaceVersion);
} catch (TlvConvertException e) {
logger.warn("Unable to convert sc_interface_version to a byte value: {}", e.getMessage());
}
}
return resp.getCommandStatus();
} else {
logger.error("connect msg type error : {}", message);
return 9;
}
}
Aggregations