Commit 89a4f1cb authored by Cedric Roux's avatar Cedric Roux
Browse files

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
parent e6130e96
......@@ -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('");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment