diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-08-06 08:26:54 +0800 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-08-06 08:29:37 +0800 |
commit | 4634013cde42402d1ab744986c4c064efc53c080 (patch) | |
tree | 3b55c9f8be99175b2a50ee8028036080470766db /openbsc/src/nat/bsc_mgcp_utils.c | |
parent | 9c31cfc3a23bf1218800da6ddebd083817ef20d4 (diff) |
mgcp: Make the CI uint32_t all the way to avoid mismatch
Diffstat (limited to 'openbsc/src/nat/bsc_mgcp_utils.c')
-rw-r--r-- | openbsc/src/nat/bsc_mgcp_utils.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/openbsc/src/nat/bsc_mgcp_utils.c b/openbsc/src/nat/bsc_mgcp_utils.c index 05963d3df..0455d1b05 100644 --- a/openbsc/src/nat/bsc_mgcp_utils.c +++ b/openbsc/src/nat/bsc_mgcp_utils.c @@ -344,16 +344,16 @@ int bsc_mgcp_parse_response(const char *str, int *code, char transaction[60]) return sscanf(str, "%3d %59s\n", code, transaction) != 2; } -int bsc_mgcp_extract_ci(const char *str) +uint32_t bsc_mgcp_extract_ci(const char *str) { - int ci; + unsigned int ci; char *res = strstr(str, "I: "); if (!res) { LOGP(DMGCP, LOGL_ERROR, "No CI in msg '%s'\n", str); return CI_UNUSED; } - if (sscanf(res, "I: %d", &ci) != 1) { + if (sscanf(res, "I: %u", &ci) != 1) { LOGP(DMGCP, LOGL_ERROR, "Failed to parse CI in msg '%s'\n", str); return CI_UNUSED; } |