fix a bug with computation of sqn ("sqn[2] << 24" in an "int" in
C; when implicitely casting to uint64_t the 31st bit is duplicated to the higher 32 bits; conclusion is easy) git-svn-id: http://svn.eurecom.fr/openair4G/trunk@7568 818b1a75-f10b-46b9-bf7c-635c3b92a50f
This commit is contained in:
@@ -394,7 +394,8 @@ int hss_mysql_push_rand_sqn(const char *imsi, uint8_t *rand_p, uint8_t *sqn)
|
||||
}
|
||||
|
||||
sqn_decimal = ((uint64_t)sqn[0] << 40) | ((uint64_t)sqn[1] << 32) |
|
||||
(sqn[2] << 24) | (sqn[3] << 16) | (sqn[4] << 8) | sqn[5];
|
||||
((uint64_t)sqn[2] << 24) | (sqn[3] << 16) |
|
||||
(sqn[4] << 8) | sqn[5];
|
||||
|
||||
query_length = sprintf(query, "UPDATE `users` SET `rand`=UNHEX('");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user