* [PATCH 0/2] Fix rilmodem SMSC quoting
@ 2015-12-04 21:16 Tony Espy
2015-12-04 21:16 ` [PATCH 1/2] rilmodem: restore SET_SMSC_ADDRESS number format Tony Espy
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Tony Espy @ 2015-12-04 21:16 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 417 bytes --]
This changeset fixes the string formatting of the
RIL_REQUEST_SET_SMSC_ADDRESS request, which requires
the string to bracketed by quotation marks.
Tony Espy (2):
rilmodem: restore SET_SMSC_ADDRESS number format
unit: update test-rilmodem-sms set_sca test case
drivers/rilmodem/sms.c | 4 +++-
unit/test-rilmodem-sms.c | 8 ++++----
2 files changed, 7 insertions(+), 5 deletions(-)
--
2.1.4
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH 1/2] rilmodem: restore SET_SMSC_ADDRESS number format 2015-12-04 21:16 [PATCH 0/2] Fix rilmodem SMSC quoting Tony Espy @ 2015-12-04 21:16 ` Tony Espy 2015-12-04 21:16 ` [PATCH 2/2] unit: update test-rilmodem-sms set_sca test case Tony Espy 2015-12-04 22:25 ` [PATCH 0/2] Fix rilmodem SMSC quoting Denis Kenzior 2 siblings, 0 replies; 4+ messages in thread From: Tony Espy @ 2015-12-04 21:16 UTC (permalink / raw) To: ofono [-- Attachment #1: Type: text/plain, Size: 800 bytes --] Restore quoting of SMSC number string, as it's required by at least one rild implementation (mako). --- drivers/rilmodem/sms.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/rilmodem/sms.c b/drivers/rilmodem/sms.c index 3eedadd..ea57b84 100644 --- a/drivers/rilmodem/sms.c +++ b/drivers/rilmodem/sms.c @@ -73,7 +73,9 @@ static void ril_csca_set(struct ofono_sms *sms, struct sms_data *sd = ofono_sms_get_data(sms); struct cb_data *cbd = cb_data_new(cb, user_data, sd); struct parcel rilp; - const char *number = phone_number_to_string(sca); + char number[OFONO_MAX_PHONE_NUMBER_LENGTH + 4]; + + snprintf(number, sizeof(number), "\"%s\"", phone_number_to_string(sca)); parcel_init(&rilp); parcel_w_string(&rilp, number); -- 2.1.4 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] unit: update test-rilmodem-sms set_sca test case 2015-12-04 21:16 [PATCH 0/2] Fix rilmodem SMSC quoting Tony Espy 2015-12-04 21:16 ` [PATCH 1/2] rilmodem: restore SET_SMSC_ADDRESS number format Tony Espy @ 2015-12-04 21:16 ` Tony Espy 2015-12-04 22:25 ` [PATCH 0/2] Fix rilmodem SMSC quoting Denis Kenzior 2 siblings, 0 replies; 4+ messages in thread From: Tony Espy @ 2015-12-04 21:16 UTC (permalink / raw) To: ofono [-- Attachment #1: Type: text/plain, Size: 1222 bytes --] Update test-rilmodem-sms set_sca test case to take into account additional quotes used for sending a SET_SMSC_ADDRESS request. --- unit/test-rilmodem-sms.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/unit/test-rilmodem-sms.c b/unit/test-rilmodem-sms.c index ae3b1b3..1ed1b51 100644 --- a/unit/test-rilmodem-sms.c +++ b/unit/test-rilmodem-sms.c @@ -237,10 +237,10 @@ static const struct sms_data testdata_sca_query_invalid_3 = { * {number="+34607003110"} */ static const guchar req_set_smsc_address_parcel_1[] = { - 0x00, 0x00, 0x00, 0x28, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x0c, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x33, 0x00, 0x34, 0x00, 0x36, 0x00, - 0x30, 0x00, 0x37, 0x00, 0x30, 0x00, 0x30, 0x00, 0x33, 0x00, 0x31, 0x00, - 0x31, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00 + 0x00, 0x00, 0x00, 0x2c, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x0e, 0x00, 0x00, 0x00, 0x22, 0x00, 0x2b, 0x00, 0x33, 0x00, 0x34, 0x00, + 0x36, 0x00, 0x30, 0x00, 0x37, 0x00, 0x30, 0x00, 0x30, 0x00, 0x33, 0x00, + 0x31, 0x00, 0x31, 0x00, 0x30, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00 }; static const struct sms_data testdata_sca_set_valid_1 = { -- 2.1.4 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 0/2] Fix rilmodem SMSC quoting 2015-12-04 21:16 [PATCH 0/2] Fix rilmodem SMSC quoting Tony Espy 2015-12-04 21:16 ` [PATCH 1/2] rilmodem: restore SET_SMSC_ADDRESS number format Tony Espy 2015-12-04 21:16 ` [PATCH 2/2] unit: update test-rilmodem-sms set_sca test case Tony Espy @ 2015-12-04 22:25 ` Denis Kenzior 2 siblings, 0 replies; 4+ messages in thread From: Denis Kenzior @ 2015-12-04 22:25 UTC (permalink / raw) To: ofono [-- Attachment #1: Type: text/plain, Size: 528 bytes --] Hi Tony, On 12/04/2015 03:16 PM, Tony Espy wrote: > This changeset fixes the string formatting of the > RIL_REQUEST_SET_SMSC_ADDRESS request, which requires > the string to bracketed by quotation marks. > > Tony Espy (2): > rilmodem: restore SET_SMSC_ADDRESS number format > unit: update test-rilmodem-sms set_sca test case > > drivers/rilmodem/sms.c | 4 +++- > unit/test-rilmodem-sms.c | 8 ++++---- > 2 files changed, 7 insertions(+), 5 deletions(-) > Both applied, thanks. Regards, -Denis ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-12-04 22:25 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-12-04 21:16 [PATCH 0/2] Fix rilmodem SMSC quoting Tony Espy 2015-12-04 21:16 ` [PATCH 1/2] rilmodem: restore SET_SMSC_ADDRESS number format Tony Espy 2015-12-04 21:16 ` [PATCH 2/2] unit: update test-rilmodem-sms set_sca test case Tony Espy 2015-12-04 22:25 ` [PATCH 0/2] Fix rilmodem SMSC quoting Denis Kenzior
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox