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.
This commit is contained in:
parent
2935034b5e
commit
c33d7d71cb
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue