diff options
author | Tobias Engel <t-openbsc@tobias.org> | 2012-02-24 22:23:17 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2012-02-24 22:23:17 +0100 |
commit | c33d7d71cb15c19f5a4f0707f6134bbec4311715 (patch) | |
tree | 3ac01c6424cb2f20191aefdffdf5e29deeae8720 /openbsc/src/libmsc/ussd.c | |
parent | 2935034b5eca87c53f05e98bba2e05f91577a662 (diff) |
Make sure USSD code only responds *#100# for retrieving own number
strstr() was used with wrong argument order, causing it to always match,
and causing an invalid response to a variety of different SS and USSD
requests.
This has apparently caused havoc among a number of HTC phones which
issue SS requests without user interaction upon boot, and then trip over
our inappropriate response.
Diffstat (limited to 'openbsc/src/libmsc/ussd.c')
-rw-r--r-- | openbsc/src/libmsc/ussd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/openbsc/src/libmsc/ussd.c b/openbsc/src/libmsc/ussd.c index 72f26bd36..76ee101a1 100644 --- a/openbsc/src/libmsc/ussd.c +++ b/openbsc/src/libmsc/ussd.c @@ -54,7 +54,7 @@ int handle_rcv_ussd(struct gsm_subscriber_connection *conn, struct msgb *msg) if (req.text[0] == 0xFF) /* Release-Complete */ return 0; - if (strstr(USSD_TEXT_OWN_NUMBER, req.text) != NULL) { + if (!strcmp(USSD_TEXT_OWN_NUMBER, (const char *)req.text)) { DEBUGP(DMM, "USSD: Own number requested\n"); rc = send_own_number(conn, msg, &req); } else { |