Closed nhanth87 closed 6 years ago
From ticket 34763,
map/map-impl/src/main/java/org/mobicents/protocols/ss7/map/service/mobility/subscriberInformation/GeographicalInformationImpl.java Idea to fix:
public static double decodeLongitude(byte[] data, int begin) { int i1 = ((data[begin] & 0xFF) << 16) | ((data[begin + 1] & 0xFF) << 8) | ((data[begin + 2] & 0xFF); if ((i1 & 0x800000) != 0) { i1 = i1 | ((int) 0xFF000000); } return i1 / koef24; } public static encodeLongitude(byte[] data, double val) { int res = (int) (koef24 * val); if (res > 0x7FFFFF) res = 0x7FFFFF; if (val < 0) res |= 0x800000; data[begin] = (byte) ((res & 0xFF0000) >> 16); data[begin + 1] = (byte) ((res & 0xFF00) >> 8); data[begin + 2] = (byte) (res & 0xFF); }
Fixed by: https://github.com/RestComm/jss7/commit/2543880d6b65343ba6c348a26ac1788e78425d7b
From ticket 34763,
map/map-impl/src/main/java/org/mobicents/protocols/ss7/map/service/mobility/subscriberInformation/GeographicalInformationImpl.java Idea to fix: