* [PATCH 3/6][RfC] stkutil: Move scaddr field to gsm_sms in stk_command_send_sms
2010-06-30 15:24 [PATCH 1/6] stk: Handle the Get Inkey proactive command Andrzej Zaborowski
2010-06-30 15:24 ` [PATCH 2/6] stk: Handle the Get Input " Andrzej Zaborowski
@ 2010-06-30 15:24 ` Andrzej Zaborowski
2010-07-02 19:52 ` Denis Kenzior
2010-06-30 15:24 ` [PATCH 4/6] test-stkutil: Fix always true condition Andrzej Zaborowski
` (2 subsequent siblings)
4 siblings, 1 reply; 8+ messages in thread
From: Andrzej Zaborowski @ 2010-06-30 15:24 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 14600 bytes --]
---
src/stkutil.c | 58 +++++++++++----
src/stkutil.h | 1 -
unit/test-stkutil.c | 205 ++++++++++++++++++++++++++++-----------------------
3 files changed, 156 insertions(+), 108 deletions(-)
diff --git a/src/stkutil.c b/src/stkutil.c
index 6f072e7..e92add3 100644
--- a/src/stkutil.c
+++ b/src/stkutil.c
@@ -2633,7 +2633,6 @@ static enum stk_command_parse_result parse_select_item(
static void destroy_send_sms(struct stk_command *command)
{
g_free(command->send_sms.alpha_id);
- g_free(command->send_sms.address.number);
g_free(command->send_sms.cdma_sms.array);
}
@@ -2644,6 +2643,7 @@ static enum stk_command_parse_result parse_send_sms(
struct stk_command_send_sms *obj = &command->send_sms;
enum stk_command_parse_result status;
struct gsm_sms_tpdu gsm_tpdu;
+ struct stk_address sc_address = { 0, NULL };
if (command->src != STK_DEVICE_IDENTITY_TYPE_UICC)
return STK_PARSE_RESULT_DATA_NOT_UNDERSTOOD;
@@ -2655,7 +2655,7 @@ static enum stk_command_parse_result parse_send_sms(
status = parse_dataobj(iter, STK_DATA_OBJECT_TYPE_ALPHA_ID, 0,
&obj->alpha_id,
STK_DATA_OBJECT_TYPE_ADDRESS, 0,
- &obj->address,
+ &sc_address,
STK_DATA_OBJECT_TYPE_GSM_SMS_TPDU, 0,
&gsm_tpdu,
STK_DATA_OBJECT_TYPE_CDMA_SMS_TPDU, 0,
@@ -2671,35 +2671,63 @@ static enum stk_command_parse_result parse_send_sms(
command->destructor = destroy_send_sms;
if (status != STK_PARSE_RESULT_OK)
- return status;
+ goto out;
- if (gsm_tpdu.len == 0 && obj->cdma_sms.len == 0)
- return STK_PARSE_RESULT_DATA_NOT_UNDERSTOOD;
+ if (gsm_tpdu.len == 0 && obj->cdma_sms.len == 0) {
+ status = STK_PARSE_RESULT_DATA_NOT_UNDERSTOOD;
+ goto out;
+ }
- if (gsm_tpdu.len > 0 && obj->cdma_sms.len > 0)
- return STK_PARSE_RESULT_DATA_NOT_UNDERSTOOD;
+ if (gsm_tpdu.len > 0 && obj->cdma_sms.len > 0) {
+ status = STK_PARSE_RESULT_DATA_NOT_UNDERSTOOD;
+ goto out;
+ }
/* We don't process CDMA pdus for now */
if (obj->cdma_sms.len > 0)
- return STK_PARSE_RESULT_OK;
+ goto out;
/* packing is needed */
if (command->qualifier & 0x01) {
if (sms_decode_unpacked_stk_pdu(gsm_tpdu.tpdu, gsm_tpdu.len,
- &obj->gsm_sms) != TRUE)
+ &obj->gsm_sms) !=
+ TRUE) {
status = STK_PARSE_RESULT_DATA_NOT_UNDERSTOOD;
- return status;
+ goto out;
+ }
+
+ goto set_addr;
}
if (sms_decode(gsm_tpdu.tpdu, gsm_tpdu.len, TRUE,
- gsm_tpdu.len, &obj->gsm_sms) == FALSE)
- return STK_PARSE_RESULT_DATA_NOT_UNDERSTOOD;
+ gsm_tpdu.len, &obj->gsm_sms) == FALSE) {
+ status = STK_PARSE_RESULT_DATA_NOT_UNDERSTOOD;
+ goto out;
+ }
if (obj->gsm_sms.type != SMS_TYPE_SUBMIT &&
- obj->gsm_sms.type != SMS_TYPE_COMMAND)
- return STK_PARSE_RESULT_DATA_NOT_UNDERSTOOD;
+ obj->gsm_sms.type != SMS_TYPE_COMMAND) {
+ status = STK_PARSE_RESULT_DATA_NOT_UNDERSTOOD;
+ goto out;
+ }
- return STK_PARSE_RESULT_OK;
+set_addr:
+ if (sc_address.number == NULL)
+ goto out;
+
+ if (strlen(sc_address.number) > 20) {
+ status = STK_PARSE_RESULT_DATA_NOT_UNDERSTOOD;
+ goto out;
+ }
+
+ strcpy(obj->gsm_sms.sc_addr.address, sc_address.number);
+ obj->gsm_sms.sc_addr.numbering_plan = sc_address.ton_npi & 15;
+ obj->gsm_sms.sc_addr.number_type = (sc_address.ton_npi >> 4) & 7;
+
+out:
+ g_free(sc_address.number);
+
+ return status;
}
static void destroy_send_ss(struct stk_command *command)
diff --git a/src/stkutil.h b/src/stkutil.h
index ca4817e..978a229 100644
--- a/src/stkutil.h
+++ b/src/stkutil.h
@@ -1118,7 +1118,6 @@ struct stk_command_select_item {
struct stk_command_send_sms {
char *alpha_id;
- struct stk_address address;
struct sms gsm_sms;
struct stk_common_byte_array cdma_sms;
struct stk_icon_id icon_id;
diff --git a/unit/test-stkutil.c b/unit/test-stkutil.c
index 8b7e254..7fa485b 100644
--- a/unit/test-stkutil.c
+++ b/unit/test-stkutil.c
@@ -207,6 +207,11 @@ static void check_response_length(const struct stk_response_length *command,
static void check_gsm_sms(const struct sms *command,
const struct sms_test *test)
{
+ g_assert(command->sc_addr.number_type == test->sc_addr.number_type);
+ g_assert(command->sc_addr.numbering_plan ==
+ test->sc_addr.numbering_plan);
+ g_assert(g_str_equal(command->sc_addr.address, test->sc_addr.address));
+
switch (test->type) {
case SMS_TYPE_SUBMIT: {
const struct sms_submit *cs = &command->submit;
@@ -7156,7 +7161,6 @@ struct send_sms_test {
unsigned int pdu_len;
unsigned char qualifier;
char *alpha_id;
- struct stk_address address;
struct sms_test gsm_sms;
struct stk_common_byte_array cdma_sms;
struct stk_icon_id icon_id;
@@ -7781,12 +7785,13 @@ static struct send_sms_test send_sms_data_111 = {
.pdu_len = sizeof(send_sms_111),
.qualifier = 0x00,
.alpha_id = "Send SM",
- .address = {
- .ton_npi = 0x91,
- .number = "112233445566778"
- },
.gsm_sms = {
- {}, SMS_TYPE_SUBMIT,
+ {
+ .number_type = SMS_NUMBER_TYPE_INTERNATIONAL,
+ .numbering_plan = SMS_NUMBERING_PLAN_ISDN,
+ .address = "112233445566778",
+ },
+ SMS_TYPE_SUBMIT,
{.submit = {
.mr = 0x00,
.daddr.address = "012345678",
@@ -7803,12 +7808,13 @@ static struct send_sms_test send_sms_data_121 = {
.pdu_len = sizeof(send_sms_121),
.qualifier = 0x01,
.alpha_id = "Send SM",
- .address = {
- .ton_npi = 0x91,
- .number = "112233445566778"
- },
.gsm_sms = {
- {}, SMS_TYPE_SUBMIT,
+ {
+ .number_type = SMS_NUMBER_TYPE_INTERNATIONAL,
+ .numbering_plan = SMS_NUMBERING_PLAN_ISDN,
+ .address = "112233445566778",
+ },
+ SMS_TYPE_SUBMIT,
{.submit = {
.mr = 0x00,
.daddr.address = "012345678",
@@ -7825,12 +7831,13 @@ static struct send_sms_test send_sms_data_131 = {
.pdu_len = sizeof(send_sms_131),
.qualifier = 0x00,
.alpha_id = "Short Message",
- .address = {
- .ton_npi = 0x91,
- .number = "112233445566778"
- },
.gsm_sms = {
- {}, SMS_TYPE_SUBMIT,
+ {
+ .number_type = SMS_NUMBER_TYPE_INTERNATIONAL,
+ .numbering_plan = SMS_NUMBERING_PLAN_ISDN,
+ .address = "112233445566778",
+ },
+ SMS_TYPE_SUBMIT,
{.submit = {
.mr = 0x00,
.daddr.address = "012345678",
@@ -7847,12 +7854,13 @@ static struct send_sms_test send_sms_data_141 = {
.pdu_len = sizeof(send_sms_141),
.qualifier = 0x01,
.alpha_id = "The address data object holds the RP_Destination_Address",
- .address = {
- .ton_npi = 0x91,
- .number = "112233445566778"
- },
.gsm_sms = {
- {}, SMS_TYPE_SUBMIT,
+ {
+ .number_type = SMS_NUMBER_TYPE_INTERNATIONAL,
+ .numbering_plan = SMS_NUMBERING_PLAN_ISDN,
+ .address = "112233445566778",
+ },
+ SMS_TYPE_SUBMIT,
{.submit = {
.mr = 0x00,
.daddr.address = "012345678",
@@ -7872,12 +7880,13 @@ static struct send_sms_test send_sms_data_151 = {
.pdu_len = sizeof(send_sms_151),
.qualifier = 0x00,
.alpha_id = "The address data object holds the RP Destination Address",
- .address = {
- .ton_npi = 0x91,
- .number = "112233445566778"
- },
.gsm_sms = {
- {}, SMS_TYPE_SUBMIT,
+ {
+ .number_type = SMS_NUMBER_TYPE_INTERNATIONAL,
+ .numbering_plan = SMS_NUMBERING_PLAN_ISDN,
+ .address = "112233445566778",
+ },
+ SMS_TYPE_SUBMIT,
{.submit = {
.mr = 0x00,
.daddr.address = "012345678",
@@ -7919,12 +7928,13 @@ static struct send_sms_test send_sms_data_171 = {
.pdu = send_sms_171,
.pdu_len = sizeof(send_sms_171),
.qualifier = 0x00,
- .address = {
- .ton_npi = 0x91,
- .number = "112233445566778"
- },
.gsm_sms = {
- {}, SMS_TYPE_SUBMIT,
+ {
+ .number_type = SMS_NUMBER_TYPE_INTERNATIONAL,
+ .numbering_plan = SMS_NUMBERING_PLAN_ISDN,
+ .address = "112233445566778",
+ },
+ SMS_TYPE_SUBMIT,
{.submit = {
.mr = 0x00,
.daddr.address = "012345678",
@@ -7940,12 +7950,13 @@ static struct send_sms_test send_sms_data_181 = {
.pdu = send_sms_181,
.pdu_len = sizeof(send_sms_181),
.qualifier = 0x00,
- .address = {
- .ton_npi = 0x91,
- .number = "112233445566778"
- },
.gsm_sms = {
- {}, SMS_TYPE_SUBMIT,
+ {
+ .number_type = SMS_NUMBER_TYPE_INTERNATIONAL,
+ .numbering_plan = SMS_NUMBERING_PLAN_ISDN,
+ .address = "112233445566778",
+ },
+ SMS_TYPE_SUBMIT,
{.submit = {
.mr = 0x00,
.daddr.address = "012345678",
@@ -7962,12 +7973,13 @@ static struct send_sms_test send_sms_data_211 = {
.pdu_len = sizeof(send_sms_211),
.qualifier = 0x00,
.alpha_id = "ЗДРАВСТВУЙТЕ",
- .address = {
- .ton_npi = 0x91,
- .number = "112233445566778"
- },
.gsm_sms = {
- {}, SMS_TYPE_SUBMIT,
+ {
+ .number_type = SMS_NUMBER_TYPE_INTERNATIONAL,
+ .numbering_plan = SMS_NUMBERING_PLAN_ISDN,
+ .address = "112233445566778",
+ },
+ SMS_TYPE_SUBMIT,
{.submit = {
.mr = 0x00,
.daddr.address = "012345678",
@@ -7984,12 +7996,13 @@ static struct send_sms_test send_sms_data_212 = {
.pdu_len = sizeof(send_sms_212),
.qualifier = 0x00,
.alpha_id = "ЗДРАВСТВУЙТЕ",
- .address = {
- .ton_npi = 0x91,
- .number = "112233445566778"
- },
.gsm_sms = {
- {}, SMS_TYPE_SUBMIT,
+ {
+ .number_type = SMS_NUMBER_TYPE_INTERNATIONAL,
+ .numbering_plan = SMS_NUMBERING_PLAN_ISDN,
+ .address = "112233445566778",
+ },
+ SMS_TYPE_SUBMIT,
{.submit = {
.mr = 0x00,
.daddr.address = "012345678",
@@ -8006,12 +8019,13 @@ static struct send_sms_test send_sms_data_213 = {
.pdu_len = sizeof(send_sms_213),
.qualifier = 0x00,
.alpha_id = "ЗДРАВСТВУЙТЕ",
- .address = {
- .ton_npi = 0x91,
- .number = "112233445566778"
- },
.gsm_sms = {
- {}, SMS_TYPE_SUBMIT,
+ {
+ .number_type = SMS_NUMBER_TYPE_INTERNATIONAL,
+ .numbering_plan = SMS_NUMBERING_PLAN_ISDN,
+ .address = "112233445566778",
+ },
+ SMS_TYPE_SUBMIT,
{.submit = {
.mr = 0x00,
.daddr.address = "012345678",
@@ -8028,12 +8042,13 @@ static struct send_sms_test send_sms_data_311 = {
.pdu_len = sizeof(send_sms_311),
.qualifier = 0x00,
.alpha_id = "NO ICON",
- .address = {
- .ton_npi = 0x91,
- .number = "112233445566778"
- },
.gsm_sms = {
- {}, SMS_TYPE_SUBMIT,
+ {
+ .number_type = SMS_NUMBER_TYPE_INTERNATIONAL,
+ .numbering_plan = SMS_NUMBERING_PLAN_ISDN,
+ .address = "112233445566778",
+ },
+ SMS_TYPE_SUBMIT,
{.submit = {
.mr = 0x00,
.daddr.address = "012345678",
@@ -8054,12 +8069,13 @@ static struct send_sms_test send_sms_data_321 = {
.pdu_len = sizeof(send_sms_321),
.qualifier = 0x00,
.alpha_id = "Send SM",
- .address = {
- .ton_npi = 0x91,
- .number = "112233445566778"
- },
.gsm_sms = {
- {}, SMS_TYPE_SUBMIT,
+ {
+ .number_type = SMS_NUMBER_TYPE_INTERNATIONAL,
+ .numbering_plan = SMS_NUMBERING_PLAN_ISDN,
+ .address = "112233445566778",
+ },
+ SMS_TYPE_SUBMIT,
{.submit = {
.mr = 0x00,
.daddr.address = "012345678",
@@ -8613,12 +8629,13 @@ static struct send_sms_test send_sms_data_511 = {
.pdu_len = sizeof(send_sms_511),
.qualifier = 0x00,
.alpha_id = "中一",
- .address = {
- .ton_npi = 0x91,
- .number = "112233445566778"
- },
.gsm_sms = {
- {}, SMS_TYPE_SUBMIT,
+ {
+ .number_type = SMS_NUMBER_TYPE_INTERNATIONAL,
+ .numbering_plan = SMS_NUMBERING_PLAN_ISDN,
+ .address = "112233445566778",
+ },
+ SMS_TYPE_SUBMIT,
{.submit = {
.mr = 0x00,
.daddr.address = "012345678",
@@ -8636,12 +8653,13 @@ static struct send_sms_test send_sms_data_512 = {
.pdu_len = sizeof(send_sms_512),
.qualifier = 0x00,
.alpha_id = "中一",
- .address = {
- .ton_npi = 0x91,
- .number = "112233445566778"
- },
.gsm_sms = {
- {}, SMS_TYPE_SUBMIT,
+ {
+ .number_type = SMS_NUMBER_TYPE_INTERNATIONAL,
+ .numbering_plan = SMS_NUMBERING_PLAN_ISDN,
+ .address = "112233445566778",
+ },
+ SMS_TYPE_SUBMIT,
{.submit = {
.mr = 0x00,
.daddr.address = "012345678",
@@ -8659,12 +8677,13 @@ static struct send_sms_test send_sms_data_513 = {
.pdu_len = sizeof(send_sms_513),
.qualifier = 0x00,
.alpha_id = "中一",
- .address = {
- .ton_npi = 0x91,
- .number = "112233445566778"
- },
.gsm_sms = {
- {}, SMS_TYPE_SUBMIT,
+ {
+ .number_type = SMS_NUMBER_TYPE_INTERNATIONAL,
+ .numbering_plan = SMS_NUMBERING_PLAN_ISDN,
+ .address = "112233445566778",
+ },
+ SMS_TYPE_SUBMIT,
{.submit = {
.mr = 0x00,
.daddr.address = "012345678",
@@ -8681,12 +8700,13 @@ static struct send_sms_test send_sms_data_611 = {
.pdu_len = sizeof(send_sms_611),
.qualifier = 0x00,
.alpha_id = "80ル0",
- .address = {
- .ton_npi = 0x91,
- .number = "112233445566778"
- },
.gsm_sms = {
- {}, SMS_TYPE_SUBMIT,
+ {
+ .number_type = SMS_NUMBER_TYPE_INTERNATIONAL,
+ .numbering_plan = SMS_NUMBERING_PLAN_ISDN,
+ .address = "112233445566778",
+ },
+ SMS_TYPE_SUBMIT,
{.submit = {
.mr = 0x00,
.daddr.address = "012345678",
@@ -8703,12 +8723,13 @@ static struct send_sms_test send_sms_data_612 = {
.pdu_len = sizeof(send_sms_612),
.qualifier = 0x00,
.alpha_id = "81ル1",
- .address = {
- .ton_npi = 0x91,
- .number = "112233445566778"
- },
.gsm_sms = {
- {}, SMS_TYPE_SUBMIT,
+ {
+ .number_type = SMS_NUMBER_TYPE_INTERNATIONAL,
+ .numbering_plan = SMS_NUMBERING_PLAN_ISDN,
+ .address = "112233445566778",
+ },
+ SMS_TYPE_SUBMIT,
{.submit = {
.mr = 0x00,
.daddr.address = "012345678",
@@ -8725,12 +8746,13 @@ static struct send_sms_test send_sms_data_613 = {
.pdu_len = sizeof(send_sms_613),
.qualifier = 0x00,
.alpha_id = "82ル2",
- .address = {
- .ton_npi = 0x91,
- .number = "112233445566778"
- },
.gsm_sms = {
- {}, SMS_TYPE_SUBMIT,
+ {
+ .number_type = SMS_NUMBER_TYPE_INTERNATIONAL,
+ .numbering_plan = SMS_NUMBERING_PLAN_ISDN,
+ .address = "112233445566778",
+ },
+ SMS_TYPE_SUBMIT,
{.submit = {
.mr = 0x00,
.daddr.address = "012345678",
@@ -8760,7 +8782,6 @@ static void test_send_sms(gconstpointer data)
g_assert(command->dst == STK_DEVICE_IDENTITY_TYPE_NETWORK);
check_alpha_id(command->send_sms.alpha_id, test->alpha_id);
- check_address(&command->send_sms.address, &test->address);
check_gsm_sms(&command->send_sms.gsm_sms, &test->gsm_sms);
check_cdma_sms_tpdu(&command->send_sms.cdma_sms, &test->cdma_sms);
check_icon_id(&command->send_sms.icon_id, &test->icon_id);
--
1.7.1.86.g0e460.dirty
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH 4/6] test-stkutil: Fix always true condition.
2010-06-30 15:24 [PATCH 1/6] stk: Handle the Get Inkey proactive command Andrzej Zaborowski
2010-06-30 15:24 ` [PATCH 2/6] stk: Handle the Get Input " Andrzej Zaborowski
2010-06-30 15:24 ` [PATCH 3/6][RfC] stkutil: Move scaddr field to gsm_sms in stk_command_send_sms Andrzej Zaborowski
@ 2010-06-30 15:24 ` Andrzej Zaborowski
2010-07-02 19:52 ` Denis Kenzior
2010-06-30 15:24 ` [PATCH 5/6] stk: Separate Dbus request cancelling from command cancelling Andrzej Zaborowski
2010-06-30 15:24 ` [PATCH 6/6][RfC] Implement the Send SMS proactive command Andrzej Zaborowski
4 siblings, 1 reply; 8+ messages in thread
From: Andrzej Zaborowski @ 2010-06-30 15:24 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 17213 bytes --]
---
unit/test-stkutil.c | 274 ++++++++++++++++++++++++++++++++++++++++++---------
1 files changed, 227 insertions(+), 47 deletions(-)
diff --git a/unit/test-stkutil.c b/unit/test-stkutil.c
index 7fa485b..c489c8c 100644
--- a/unit/test-stkutil.c
+++ b/unit/test-stkutil.c
@@ -225,8 +225,8 @@ static void check_gsm_sms(const struct sms *command,
g_assert(cs->srr == ts->srr);
g_assert(cs->mr == ts->mr);
- g_assert(cs->daddr.number_type == cs->daddr.number_type);
- g_assert(cs->daddr.numbering_plan == cs->daddr.numbering_plan);
+ g_assert(cs->daddr.number_type == ts->daddr.number_type);
+ g_assert(cs->daddr.numbering_plan == ts->daddr.numbering_plan);
g_assert(g_str_equal(cs->daddr.address, ts->daddr.address));
g_assert(cs->pid == ts->pid);
@@ -7794,7 +7794,11 @@ static struct send_sms_test send_sms_data_111 = {
SMS_TYPE_SUBMIT,
{.submit = {
.mr = 0x00,
- .daddr.address = "012345678",
+ .daddr = {
+ .number_type = SMS_NUMBER_TYPE_INTERNATIONAL,
+ .numbering_plan = SMS_NUMBERING_PLAN_ISDN,
+ .address = "012345678",
+ },
.pid = 0x40,
.dcs = 0xF4,
.udl = 12,
@@ -7817,7 +7821,11 @@ static struct send_sms_test send_sms_data_121 = {
SMS_TYPE_SUBMIT,
{.submit = {
.mr = 0x00,
- .daddr.address = "012345678",
+ .daddr = {
+ .number_type = SMS_NUMBER_TYPE_INTERNATIONAL,
+ .numbering_plan = SMS_NUMBERING_PLAN_ISDN,
+ .address = "012345678",
+ },
.pid = 0x40,
.dcs = 0xF0,
.udl = 7,
@@ -7840,7 +7848,11 @@ static struct send_sms_test send_sms_data_131 = {
SMS_TYPE_SUBMIT,
{.submit = {
.mr = 0x00,
- .daddr.address = "012345678",
+ .daddr = {
+ .number_type = SMS_NUMBER_TYPE_INTERNATIONAL,
+ .numbering_plan = SMS_NUMBERING_PLAN_ISDN,
+ .address = "012345678",
+ },
.pid = 0x40,
.dcs = 0xF0,
.udl = 13,
@@ -7863,7 +7875,11 @@ static struct send_sms_test send_sms_data_141 = {
SMS_TYPE_SUBMIT,
{.submit = {
.mr = 0x00,
- .daddr.address = "012345678",
+ .daddr = {
+ .number_type = SMS_NUMBER_TYPE_INTERNATIONAL,
+ .numbering_plan = SMS_NUMBERING_PLAN_ISDN,
+ .address = "012345678",
+ },
.pid = 0x40,
.dcs = 0xF0,
.udl = 160,
@@ -7889,7 +7905,11 @@ static struct send_sms_test send_sms_data_151 = {
SMS_TYPE_SUBMIT,
{.submit = {
.mr = 0x00,
- .daddr.address = "012345678",
+ .daddr = {
+ .number_type = SMS_NUMBER_TYPE_INTERNATIONAL,
+ .numbering_plan = SMS_NUMBERING_PLAN_ISDN,
+ .address = "012345678",
+ },
.pid = 0x40,
.dcs = 0xF0,
.udl = 160,
@@ -7915,7 +7935,11 @@ static struct send_sms_test send_sms_data_161 = {
{}, SMS_TYPE_SUBMIT,
{.submit = {
.mr = 0x00,
- .daddr.address = "01",
+ .daddr = {
+ .number_type = SMS_NUMBER_TYPE_INTERNATIONAL,
+ .numbering_plan = SMS_NUMBERING_PLAN_ISDN,
+ .address = "01",
+ },
.pid = 0x40,
.dcs = 0xF0,
.udl = 1,
@@ -7937,7 +7961,11 @@ static struct send_sms_test send_sms_data_171 = {
SMS_TYPE_SUBMIT,
{.submit = {
.mr = 0x00,
- .daddr.address = "012345678",
+ .daddr = {
+ .number_type = SMS_NUMBER_TYPE_INTERNATIONAL,
+ .numbering_plan = SMS_NUMBERING_PLAN_ISDN,
+ .address = "012345678",
+ },
.pid = 0x40,
.dcs = 0xF4,
.udl = 12,
@@ -7959,7 +7987,11 @@ static struct send_sms_test send_sms_data_181 = {
SMS_TYPE_SUBMIT,
{.submit = {
.mr = 0x00,
- .daddr.address = "012345678",
+ .daddr = {
+ .number_type = SMS_NUMBER_TYPE_INTERNATIONAL,
+ .numbering_plan = SMS_NUMBERING_PLAN_ISDN,
+ .address = "012345678",
+ },
.pid = 0x40,
.dcs = 0xF4,
.udl = 12,
@@ -7982,7 +8014,11 @@ static struct send_sms_test send_sms_data_211 = {
SMS_TYPE_SUBMIT,
{.submit = {
.mr = 0x00,
- .daddr.address = "012345678",
+ .daddr = {
+ .number_type = SMS_NUMBER_TYPE_INTERNATIONAL,
+ .numbering_plan = SMS_NUMBERING_PLAN_ISDN,
+ .address = "012345678",
+ },
.pid = 0x40,
.dcs = 0x08,
.udl = 24,
@@ -8005,7 +8041,11 @@ static struct send_sms_test send_sms_data_212 = {
SMS_TYPE_SUBMIT,
{.submit = {
.mr = 0x00,
- .daddr.address = "012345678",
+ .daddr = {
+ .number_type = SMS_NUMBER_TYPE_INTERNATIONAL,
+ .numbering_plan = SMS_NUMBERING_PLAN_ISDN,
+ .address = "012345678",
+ },
.pid = 0x40,
.dcs = 0x08,
.udl = 24,
@@ -8028,7 +8068,11 @@ static struct send_sms_test send_sms_data_213 = {
SMS_TYPE_SUBMIT,
{.submit = {
.mr = 0x00,
- .daddr.address = "012345678",
+ .daddr = {
+ .number_type = SMS_NUMBER_TYPE_INTERNATIONAL,
+ .numbering_plan = SMS_NUMBERING_PLAN_ISDN,
+ .address = "012345678",
+ },
.pid = 0x40,
.dcs = 0x08,
.udl = 24,
@@ -8051,7 +8095,11 @@ static struct send_sms_test send_sms_data_311 = {
SMS_TYPE_SUBMIT,
{.submit = {
.mr = 0x00,
- .daddr.address = "012345678",
+ .daddr = {
+ .number_type = SMS_NUMBER_TYPE_INTERNATIONAL,
+ .numbering_plan = SMS_NUMBERING_PLAN_ISDN,
+ .address = "012345678",
+ },
.pid = 0x40,
.dcs = 0xF4,
.udl = 12,
@@ -8078,7 +8126,11 @@ static struct send_sms_test send_sms_data_321 = {
SMS_TYPE_SUBMIT,
{.submit = {
.mr = 0x00,
- .daddr.address = "012345678",
+ .daddr = {
+ .number_type = SMS_NUMBER_TYPE_INTERNATIONAL,
+ .numbering_plan = SMS_NUMBERING_PLAN_ISDN,
+ .address = "012345678",
+ },
.pid = 0x40,
.dcs = 0xF4,
.udl = 12,
@@ -8100,7 +8152,11 @@ static struct send_sms_test send_sms_data_411 = {
{}, SMS_TYPE_SUBMIT,
{.submit = {
.mr = 0x00,
- .daddr.address = "01",
+ .daddr = {
+ .number_type = SMS_NUMBER_TYPE_INTERNATIONAL,
+ .numbering_plan = SMS_NUMBERING_PLAN_ISDN,
+ .address = "01",
+ },
.pid = 0x40,
.dcs = 0xF0,
.udl = 1,
@@ -8122,7 +8178,11 @@ static struct send_sms_test send_sms_data_412 = {
{}, SMS_TYPE_SUBMIT,
{.submit = {
.mr = 0x00,
- .daddr.address = "01",
+ .daddr = {
+ .number_type = SMS_NUMBER_TYPE_INTERNATIONAL,
+ .numbering_plan = SMS_NUMBERING_PLAN_ISDN,
+ .address = "01",
+ },
.pid = 0x40,
.dcs = 0xF0,
.udl = 1,
@@ -8140,7 +8200,11 @@ static struct send_sms_test send_sms_data_421 = {
{}, SMS_TYPE_SUBMIT,
{.submit = {
.mr = 0x00,
- .daddr.address = "01",
+ .daddr = {
+ .number_type = SMS_NUMBER_TYPE_INTERNATIONAL,
+ .numbering_plan = SMS_NUMBERING_PLAN_ISDN,
+ .address = "01",
+ },
.pid = 0x40,
.dcs = 0xF0,
.udl = 1,
@@ -8162,7 +8226,11 @@ static struct send_sms_test send_sms_data_422 = {
{}, SMS_TYPE_SUBMIT,
{.submit = {
.mr = 0x00,
- .daddr.address = "01",
+ .daddr = {
+ .number_type = SMS_NUMBER_TYPE_INTERNATIONAL,
+ .numbering_plan = SMS_NUMBERING_PLAN_ISDN,
+ .address = "01",
+ },
.pid = 0x40,
.dcs = 0xF0,
.udl = 1,
@@ -8180,7 +8248,11 @@ static struct send_sms_test send_sms_data_431 = {
{}, SMS_TYPE_SUBMIT,
{.submit = {
.mr = 0x00,
- .daddr.address = "01",
+ .daddr = {
+ .number_type = SMS_NUMBER_TYPE_INTERNATIONAL,
+ .numbering_plan = SMS_NUMBERING_PLAN_ISDN,
+ .address = "01",
+ },
.pid = 0x40,
.dcs = 0xF0,
.udl = 1,
@@ -8202,7 +8274,11 @@ static struct send_sms_test send_sms_data_432 = {
{}, SMS_TYPE_SUBMIT,
{.submit = {
.mr = 0x00,
- .daddr.address = "01",
+ .daddr = {
+ .number_type = SMS_NUMBER_TYPE_INTERNATIONAL,
+ .numbering_plan = SMS_NUMBERING_PLAN_ISDN,
+ .address = "01",
+ },
.pid = 0x40,
.dcs = 0xF0,
.udl = 1,
@@ -8220,7 +8296,11 @@ static struct send_sms_test send_sms_data_441 = {
{}, SMS_TYPE_SUBMIT,
{.submit = {
.mr = 0x00,
- .daddr.address = "01",
+ .daddr = {
+ .number_type = SMS_NUMBER_TYPE_INTERNATIONAL,
+ .numbering_plan = SMS_NUMBERING_PLAN_ISDN,
+ .address = "01",
+ },
.pid = 0x40,
.dcs = 0xF0,
.udl = 1,
@@ -8242,7 +8322,11 @@ static struct send_sms_test send_sms_data_442 = {
{}, SMS_TYPE_SUBMIT,
{.submit = {
.mr = 0x00,
- .daddr.address = "01",
+ .daddr = {
+ .number_type = SMS_NUMBER_TYPE_INTERNATIONAL,
+ .numbering_plan = SMS_NUMBERING_PLAN_ISDN,
+ .address = "01",
+ },
.pid = 0x40,
.dcs = 0xF0,
.udl = 1,
@@ -8264,7 +8348,11 @@ static struct send_sms_test send_sms_data_443 = {
{}, SMS_TYPE_SUBMIT,
{.submit = {
.mr = 0x00,
- .daddr.address = "01",
+ .daddr = {
+ .number_type = SMS_NUMBER_TYPE_INTERNATIONAL,
+ .numbering_plan = SMS_NUMBERING_PLAN_ISDN,
+ .address = "01",
+ },
.pid = 0x40,
.dcs = 0xF0,
.udl = 1,
@@ -8282,7 +8370,11 @@ static struct send_sms_test send_sms_data_451 = {
{}, SMS_TYPE_SUBMIT,
{.submit = {
.mr = 0x00,
- .daddr.address = "01",
+ .daddr = {
+ .number_type = SMS_NUMBER_TYPE_INTERNATIONAL,
+ .numbering_plan = SMS_NUMBERING_PLAN_ISDN,
+ .address = "01",
+ },
.pid = 0x40,
.dcs = 0xF0,
.udl = 1,
@@ -8304,7 +8396,11 @@ static struct send_sms_test send_sms_data_452 = {
{}, SMS_TYPE_SUBMIT,
{.submit = {
.mr = 0x00,
- .daddr.address = "01",
+ .daddr = {
+ .number_type = SMS_NUMBER_TYPE_INTERNATIONAL,
+ .numbering_plan = SMS_NUMBERING_PLAN_ISDN,
+ .address = "01",
+ },
.pid = 0x40,
.dcs = 0xF0,
.udl = 1,
@@ -8326,7 +8422,11 @@ static struct send_sms_test send_sms_data_453 = {
{}, SMS_TYPE_SUBMIT,
{.submit = {
.mr = 0x00,
- .daddr.address = "01",
+ .daddr = {
+ .number_type = SMS_NUMBER_TYPE_INTERNATIONAL,
+ .numbering_plan = SMS_NUMBERING_PLAN_ISDN,
+ .address = "01",
+ },
.pid = 0x40,
.dcs = 0xF0,
.udl = 1,
@@ -8344,7 +8444,11 @@ static struct send_sms_test send_sms_data_461 = {
{}, SMS_TYPE_SUBMIT,
{.submit = {
.mr = 0x00,
- .daddr.address = "01",
+ .daddr = {
+ .number_type = SMS_NUMBER_TYPE_INTERNATIONAL,
+ .numbering_plan = SMS_NUMBERING_PLAN_ISDN,
+ .address = "01",
+ },
.pid = 0x40,
.dcs = 0xF0,
.udl = 1,
@@ -8366,7 +8470,11 @@ static struct send_sms_test send_sms_data_462 = {
{}, SMS_TYPE_SUBMIT,
{.submit = {
.mr = 0x00,
- .daddr.address = "01",
+ .daddr = {
+ .number_type = SMS_NUMBER_TYPE_INTERNATIONAL,
+ .numbering_plan = SMS_NUMBERING_PLAN_ISDN,
+ .address = "01",
+ },
.pid = 0x40,
.dcs = 0xF0,
.udl = 1,
@@ -8388,7 +8496,11 @@ static struct send_sms_test send_sms_data_463 = {
{}, SMS_TYPE_SUBMIT,
{.submit = {
.mr = 0x00,
- .daddr.address = "01",
+ .daddr = {
+ .number_type = SMS_NUMBER_TYPE_INTERNATIONAL,
+ .numbering_plan = SMS_NUMBERING_PLAN_ISDN,
+ .address = "01",
+ },
.pid = 0x40,
.dcs = 0xF0,
.udl = 1,
@@ -8406,7 +8518,11 @@ static struct send_sms_test send_sms_data_471 = {
{}, SMS_TYPE_SUBMIT,
{.submit = {
.mr = 0x00,
- .daddr.address = "01",
+ .daddr = {
+ .number_type = SMS_NUMBER_TYPE_INTERNATIONAL,
+ .numbering_plan = SMS_NUMBERING_PLAN_ISDN,
+ .address = "01",
+ },
.pid = 0x40,
.dcs = 0xF0,
.udl = 1,
@@ -8428,7 +8544,11 @@ static struct send_sms_test send_sms_data_472 = {
{}, SMS_TYPE_SUBMIT,
{.submit = {
.mr = 0x00,
- .daddr.address = "01",
+ .daddr = {
+ .number_type = SMS_NUMBER_TYPE_INTERNATIONAL,
+ .numbering_plan = SMS_NUMBERING_PLAN_ISDN,
+ .address = "01",
+ },
.pid = 0x40,
.dcs = 0xF0,
.udl = 1,
@@ -8450,7 +8570,11 @@ static struct send_sms_test send_sms_data_473 = {
{}, SMS_TYPE_SUBMIT,
{.submit = {
.mr = 0x00,
- .daddr.address = "01",
+ .daddr = {
+ .number_type = SMS_NUMBER_TYPE_INTERNATIONAL,
+ .numbering_plan = SMS_NUMBERING_PLAN_ISDN,
+ .address = "01",
+ },
.pid = 0x40,
.dcs = 0xF0,
.udl = 1,
@@ -8468,7 +8592,11 @@ static struct send_sms_test send_sms_data_481 = {
{}, SMS_TYPE_SUBMIT,
{.submit = {
.mr = 0x00,
- .daddr.address = "01",
+ .daddr = {
+ .number_type = SMS_NUMBER_TYPE_INTERNATIONAL,
+ .numbering_plan = SMS_NUMBERING_PLAN_ISDN,
+ .address = "01",
+ },
.pid = 0x40,
.dcs = 0xF0,
.udl = 1,
@@ -8490,7 +8618,11 @@ static struct send_sms_test send_sms_data_482 = {
{}, SMS_TYPE_SUBMIT,
{.submit = {
.mr = 0x00,
- .daddr.address = "01",
+ .daddr = {
+ .number_type = SMS_NUMBER_TYPE_INTERNATIONAL,
+ .numbering_plan = SMS_NUMBERING_PLAN_ISDN,
+ .address = "01",
+ },
.pid = 0x40,
.dcs = 0xF0,
.udl = 1,
@@ -8512,7 +8644,11 @@ static struct send_sms_test send_sms_data_483 = {
{}, SMS_TYPE_SUBMIT,
{.submit = {
.mr = 0x00,
- .daddr.address = "01",
+ .daddr = {
+ .number_type = SMS_NUMBER_TYPE_INTERNATIONAL,
+ .numbering_plan = SMS_NUMBERING_PLAN_ISDN,
+ .address = "01",
+ },
.pid = 0x40,
.dcs = 0xF0,
.udl = 1,
@@ -8530,7 +8666,11 @@ static struct send_sms_test send_sms_data_491 = {
{}, SMS_TYPE_SUBMIT,
{.submit = {
.mr = 0x00,
- .daddr.address = "01",
+ .daddr = {
+ .number_type = SMS_NUMBER_TYPE_INTERNATIONAL,
+ .numbering_plan = SMS_NUMBERING_PLAN_ISDN,
+ .address = "01",
+ },
.pid = 0x40,
.dcs = 0xF0,
.udl = 1,
@@ -8552,7 +8692,11 @@ static struct send_sms_test send_sms_data_492 = {
{}, SMS_TYPE_SUBMIT,
{.submit = {
.mr = 0x00,
- .daddr.address = "01",
+ .daddr = {
+ .number_type = SMS_NUMBER_TYPE_INTERNATIONAL,
+ .numbering_plan = SMS_NUMBERING_PLAN_ISDN,
+ .address = "01",
+ },
.pid = 0x40,
.dcs = 0xF0,
.udl = 1,
@@ -8574,7 +8718,11 @@ static struct send_sms_test send_sms_data_493 = {
{}, SMS_TYPE_SUBMIT,
{.submit = {
.mr = 0x00,
- .daddr.address = "01",
+ .daddr = {
+ .number_type = SMS_NUMBER_TYPE_INTERNATIONAL,
+ .numbering_plan = SMS_NUMBERING_PLAN_ISDN,
+ .address = "01",
+ },
.pid = 0x40,
.dcs = 0xF0,
.udl = 1,
@@ -8592,7 +8740,11 @@ static struct send_sms_test send_sms_data_4101 = {
{}, SMS_TYPE_SUBMIT,
{.submit = {
.mr = 0x00,
- .daddr.address = "01",
+ .daddr = {
+ .number_type = SMS_NUMBER_TYPE_INTERNATIONAL,
+ .numbering_plan = SMS_NUMBERING_PLAN_ISDN,
+ .address = "01",
+ },
.pid = 0x40,
.dcs = 0xF0,
.udl = 1,
@@ -8614,7 +8766,11 @@ static struct send_sms_test send_sms_data_4102 = {
{}, SMS_TYPE_SUBMIT,
{.submit = {
.mr = 0x00,
- .daddr.address = "01",
+ .daddr = {
+ .number_type = SMS_NUMBER_TYPE_INTERNATIONAL,
+ .numbering_plan = SMS_NUMBERING_PLAN_ISDN,
+ .address = "01",
+ },
.pid = 0x40,
.dcs = 0xF0,
.udl = 1,
@@ -8638,7 +8794,11 @@ static struct send_sms_test send_sms_data_511 = {
SMS_TYPE_SUBMIT,
{.submit = {
.mr = 0x00,
- .daddr.address = "012345678",
+ .daddr = {
+ .number_type = SMS_NUMBER_TYPE_INTERNATIONAL,
+ .numbering_plan = SMS_NUMBERING_PLAN_ISDN,
+ .address = "012345678",
+ },
.pid = 0x40,
.dcs = 0x08,
.udl = 4,
@@ -8662,7 +8822,11 @@ static struct send_sms_test send_sms_data_512 = {
SMS_TYPE_SUBMIT,
{.submit = {
.mr = 0x00,
- .daddr.address = "012345678",
+ .daddr = {
+ .number_type = SMS_NUMBER_TYPE_INTERNATIONAL,
+ .numbering_plan = SMS_NUMBERING_PLAN_ISDN,
+ .address = "012345678",
+ },
.pid = 0x40,
.dcs = 0x08,
.udl = 4,
@@ -8686,7 +8850,11 @@ static struct send_sms_test send_sms_data_513 = {
SMS_TYPE_SUBMIT,
{.submit = {
.mr = 0x00,
- .daddr.address = "012345678",
+ .daddr = {
+ .number_type = SMS_NUMBER_TYPE_INTERNATIONAL,
+ .numbering_plan = SMS_NUMBERING_PLAN_ISDN,
+ .address = "012345678",
+ },
.pid = 0x40,
.dcs = 0x08,
.udl = 4,
@@ -8709,7 +8877,11 @@ static struct send_sms_test send_sms_data_611 = {
SMS_TYPE_SUBMIT,
{.submit = {
.mr = 0x00,
- .daddr.address = "012345678",
+ .daddr = {
+ .number_type = SMS_NUMBER_TYPE_INTERNATIONAL,
+ .numbering_plan = SMS_NUMBERING_PLAN_ISDN,
+ .address = "012345678",
+ },
.pid = 0x40,
.dcs = 0x08,
.udl = 8,
@@ -8732,7 +8904,11 @@ static struct send_sms_test send_sms_data_612 = {
SMS_TYPE_SUBMIT,
{.submit = {
.mr = 0x00,
- .daddr.address = "012345678",
+ .daddr = {
+ .number_type = SMS_NUMBER_TYPE_INTERNATIONAL,
+ .numbering_plan = SMS_NUMBERING_PLAN_ISDN,
+ .address = "012345678",
+ },
.pid = 0x40,
.dcs = 0x08,
.udl = 8,
@@ -8755,7 +8931,11 @@ static struct send_sms_test send_sms_data_613 = {
SMS_TYPE_SUBMIT,
{.submit = {
.mr = 0x00,
- .daddr.address = "012345678",
+ .daddr = {
+ .number_type = SMS_NUMBER_TYPE_INTERNATIONAL,
+ .numbering_plan = SMS_NUMBERING_PLAN_ISDN,
+ .address = "012345678",
+ },
.pid = 0x40,
.dcs = 0x08,
.udl = 8,
--
1.7.1.86.g0e460.dirty
^ permalink raw reply related [flat|nested] 8+ messages in thread