* [PATCH 1/5] stk: Add parser for send ussd commands
@ 2010-06-17 10:35 Yang Gu
2010-06-17 10:35 ` [PATCH 2/5] teststk: Add test for send ussd parser Yang Gu
` (4 more replies)
0 siblings, 5 replies; 9+ messages in thread
From: Yang Gu @ 2010-06-17 10:35 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 3912 bytes --]
---
src/stkutil.c | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
src/stkutil.h | 9 ++++++++
2 files changed, 70 insertions(+), 0 deletions(-)
diff --git a/src/stkutil.c b/src/stkutil.c
index 44a8eff..f03b25c 100644
--- a/src/stkutil.c
+++ b/src/stkutil.c
@@ -585,6 +585,24 @@ static gboolean parse_dataobj_tone(struct comprehension_tlv_iter *iter,
return parse_dataobj_common_byte(iter, byte);
}
+/* Defined in TS 102.223 Section 8.17 */
+static gboolean parse_dataobj_ussd(struct comprehension_tlv_iter *iter,
+ void *user)
+{
+ struct stk_ussd_string *us = user;
+ unsigned int len = comprehension_tlv_iter_get_length(iter);
+ const unsigned char *data = comprehension_tlv_iter_get_data(iter);
+
+ if (len <= 1)
+ return FALSE;
+
+ us->dcs = data[0];
+ us->len = len - 1;
+ memcpy(us->string, data + 1, us->len);
+
+ return TRUE;
+}
+
/* Defined in TS 102.223 Section 8.18 */
static gboolean parse_dataobj_file_list(struct comprehension_tlv_iter *iter,
void *user)
@@ -1996,6 +2014,8 @@ static dataobj_handler handler_for_type(enum stk_data_object_type type)
return parse_dataobj_text;
case STK_DATA_OBJECT_TYPE_TONE:
return parse_dataobj_tone;
+ case STK_DATA_OBJECT_TYPE_USSD_STRING:
+ return parse_dataobj_ussd;
case STK_DATA_OBJECT_TYPE_FILE_LIST:
return parse_dataobj_file_list;
case STK_DATA_OBJECT_TYPE_LOCATION_INFO:
@@ -2710,6 +2730,44 @@ static gboolean parse_send_ss(struct stk_command *command,
return TRUE;
}
+static void destroy_send_ussd(struct stk_command *command)
+{
+ g_free(command->send_ussd.alpha_id);
+}
+
+static gboolean parse_send_ussd(struct stk_command *command,
+ struct comprehension_tlv_iter *iter)
+{
+ struct stk_command_send_ussd *obj = &command->send_ussd;
+ gboolean ret;
+
+ if (command->src != STK_DEVICE_IDENTITY_TYPE_UICC)
+ return FALSE;
+
+ if (command->dst != STK_DEVICE_IDENTITY_TYPE_NETWORK)
+ return FALSE;
+
+ ret = parse_dataobj(iter, STK_DATA_OBJECT_TYPE_ALPHA_ID, 0,
+ &obj->alpha_id,
+ STK_DATA_OBJECT_TYPE_USSD_STRING,
+ DATAOBJ_FLAG_MANDATORY | DATAOBJ_FLAG_MINIMUM,
+ &obj->ussd_string,
+ STK_DATA_OBJECT_TYPE_ICON_ID, 0,
+ &obj->icon_id,
+ STK_DATA_OBJECT_TYPE_TEXT_ATTRIBUTE, 0,
+ &obj->text_attr,
+ STK_DATA_OBJECT_TYPE_FRAME_ID, 0,
+ &obj->frame_id,
+ STK_DATA_OBJECT_TYPE_INVALID);
+
+ command->destructor = destroy_send_ussd;
+
+ if (ret == FALSE)
+ return FALSE;
+
+ return TRUE;
+}
+
static void destroy_setup_call(struct stk_command *command)
{
g_free(command->setup_call.alpha_id_usr_cfm);
@@ -3672,6 +3730,9 @@ struct stk_command *stk_command_new_from_pdu(const unsigned char *pdu,
case STK_COMMAND_TYPE_SEND_SS:
ok = parse_send_ss(command, &iter);
break;
+ case STK_COMMAND_TYPE_SEND_USSD:
+ ok = parse_send_ussd(command, &iter);
+ break;
case STK_COMMAND_TYPE_SETUP_CALL:
ok = parse_setup_call(command, &iter);
break;
diff --git a/src/stkutil.h b/src/stkutil.h
index 471e10f..6fb49e0 100644
--- a/src/stkutil.h
+++ b/src/stkutil.h
@@ -1117,6 +1117,14 @@ struct stk_command_send_ss {
struct stk_frame_id frame_id;
};
+struct stk_command_send_ussd {
+ char *alpha_id;
+ struct stk_ussd_string ussd_string;
+ struct stk_icon_id icon_id;
+ struct stk_text_attribute text_attr;
+ struct stk_frame_id frame_id;
+};
+
struct stk_command_setup_call {
char *alpha_id_usr_cfm;
struct stk_address addr;
@@ -1295,6 +1303,7 @@ struct stk_command {
struct stk_command_select_item select_item;
struct stk_command_send_sms send_sms;
struct stk_command_send_ss send_ss;
+ struct stk_command_send_ussd send_ussd;
struct stk_command_setup_call setup_call;
struct stk_command_setup_event_list setup_event_list;
struct stk_command_perform_card_apdu perform_card_apdu;
--
1.7.0.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/5] teststk: Add test for send ussd parser
2010-06-17 10:35 [PATCH 1/5] stk: Add parser for send ussd commands Yang Gu
@ 2010-06-17 10:35 ` Yang Gu
2010-06-17 10:35 ` [PATCH 3/5] Modify " Yang Gu
` (3 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: Yang Gu @ 2010-06-17 10:35 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 48900 bytes --]
---
src/smsutil.c | 44 ++
src/smsutil.h | 2 +
unit/test-stkutil.c | 1319 +++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 1365 insertions(+), 0 deletions(-)
diff --git a/src/smsutil.c b/src/smsutil.c
index 95eca06..5fa4be5 100644
--- a/src/smsutil.c
+++ b/src/smsutil.c
@@ -3747,3 +3747,47 @@ gboolean cbs_topic_in_range(unsigned int topic, GSList *ranges)
return g_slist_find_custom(ranges, GUINT_TO_POINTER(topic),
cbs_topic_compare) != NULL;
}
+
+char *ussd_decode(int dcs, int len, const unsigned char *data)
+{
+ gboolean udhi;
+ enum sms_charset charset;
+ gboolean compressed;
+ gboolean iso639;
+ char *utf8;
+
+ if (!cbs_dcs_decode(dcs, &udhi, NULL, &charset,
+ &compressed, NULL, &iso639))
+ return NULL;
+
+ if (udhi || compressed || iso639)
+ return NULL;
+
+ switch (charset) {
+ case SMS_CHARSET_7BIT:
+ {
+ long written;
+ unsigned char *unpacked = unpack_7bit(data, len, 0, TRUE, 0,
+ &written, 0);
+ if (unpacked == NULL)
+ return NULL;
+
+ utf8 = convert_gsm_to_utf8(unpacked, written, NULL, NULL, 0);
+ g_free(unpacked);
+
+ break;
+ }
+ case SMS_CHARSET_8BIT:
+ utf8 = convert_gsm_to_utf8(data, len, NULL, NULL, 0);
+ break;
+ case SMS_CHARSET_UCS2:
+ utf8 = g_convert((const gchar *) data, len,
+ "UTF-8//TRANSLIT", "UCS-2BE",
+ NULL, NULL, NULL);
+ break;
+ default:
+ utf8 = NULL;
+ }
+
+ return utf8;
+}
diff --git a/src/smsutil.h b/src/smsutil.h
index 1bd42bb..d7026ec 100644
--- a/src/smsutil.h
+++ b/src/smsutil.h
@@ -508,3 +508,5 @@ char *cbs_topic_ranges_to_string(GSList *ranges);
GSList *cbs_extract_topic_ranges(const char *ranges);
GSList *cbs_optimize_ranges(GSList *ranges);
gboolean cbs_topic_in_range(unsigned int topic, GSList *ranges);
+
+char *ussd_decode(int dcs, int len, const unsigned char *data);
diff --git a/unit/test-stkutil.c b/unit/test-stkutil.c
index 706dd85..e498dd6 100644
--- a/unit/test-stkutil.c
+++ b/unit/test-stkutil.c
@@ -294,6 +294,14 @@ static inline void check_tone(const ofono_bool_t command,
check_common_bool(command, test);
}
+/* Defined in TS 102.223 Section 8.17 */
+static inline void check_ussd(const struct stk_ussd_string *command,
+ const char *test)
+{
+ char *utf8 = ussd_decode(command->dcs, command->len, command->string);
+ check_common_text(utf8, test);
+}
+
/* Defined in TS 102.223 Section 8.18 */
static void check_file_list(GSList *command, const struct stk_file *test)
{
@@ -9712,6 +9720,1238 @@ static void test_send_ss(gconstpointer data)
stk_command_free(command);
}
+struct send_ussd_test {
+ const unsigned char *pdu;
+ unsigned int pdu_len;
+ unsigned char qualifier;
+ char *alpha_id;
+ char *ussd;
+ struct stk_icon_id icon_id;
+ struct stk_text_attribute text_attr;
+ struct stk_frame_id frame_id;
+};
+
+static unsigned char send_ussd_111[] = { 0xD0, 0x50, 0x81, 0x03, 0x01, 0x12,
+ 0x00, 0x82, 0x02, 0x81, 0x83,
+ 0x85, 0x0A, 0x37, 0x2D, 0x62,
+ 0x69, 0x74, 0x20, 0x55, 0x53,
+ 0x53, 0x44, 0x8A, 0x39, 0xF0,
+ 0x41, 0xE1, 0x90, 0x58, 0x34,
+ 0x1E, 0x91, 0x49, 0xE5, 0x92,
+ 0xD9, 0x74, 0x3E, 0xA1, 0x51,
+ 0xE9, 0x94, 0x5A, 0xB5, 0x5E,
+ 0xB1, 0x59, 0x6D, 0x2B, 0x2C,
+ 0x1E, 0x93, 0xCB, 0xE6, 0x33,
+ 0x3A, 0xAD, 0x5E, 0xB3, 0xDB,
+ 0xEE, 0x37, 0x3C, 0x2E, 0x9F,
+ 0xD3, 0xEB, 0xF6, 0x3B, 0x3E,
+ 0xAF, 0x6F, 0xC5, 0x64, 0x33,
+ 0x5A, 0xCD, 0x76, 0xC3, 0xE5,
+ 0x60 };
+
+static unsigned char send_ussd_121[] = { 0xD0, 0x58, 0x81, 0x03, 0x01, 0x12,
+ 0x00, 0x82, 0x02, 0x81, 0x83,
+ 0x85, 0x0A, 0x38, 0x2D, 0x62,
+ 0x69, 0x74, 0x20, 0x55, 0x53,
+ 0x53, 0x44, 0x8A, 0x41, 0x44,
+ 0x41, 0x42, 0x43, 0x44, 0x45,
+ 0x46, 0x47, 0x48, 0x49, 0x4A,
+ 0x4B, 0x4C, 0x4D, 0x4E, 0x4F,
+ 0x50, 0x51, 0x52, 0x53, 0x54,
+ 0x55, 0x56, 0x57, 0x58, 0x59,
+ 0x5A, 0x2D, 0x61, 0x62, 0x63,
+ 0x64, 0x65, 0x66, 0x67, 0x68,
+ 0x69, 0x6A, 0x6B, 0x6C, 0x6D,
+ 0x6E, 0x6F, 0x70, 0x71, 0x72,
+ 0x73, 0x74, 0x75, 0x76, 0x77,
+ 0x78, 0x79, 0x7A, 0x2D, 0x31,
+ 0x32, 0x33, 0x34, 0x35, 0x36,
+ 0x37, 0x38, 0x39, 0x30 };
+
+static unsigned char send_ussd_131[] = { 0xD0, 0x2F, 0x81, 0x03, 0x01, 0x12,
+ 0x00, 0x82, 0x02, 0x81, 0x83,
+ 0x85, 0x09, 0x55, 0x43, 0x53,
+ 0x32, 0x20, 0x55, 0x53, 0x53,
+ 0x44, 0x8A, 0x19, 0x48, 0x04,
+ 0x17, 0x04, 0x14, 0x04, 0x20,
+ 0x04, 0x10, 0x04, 0x12, 0x04,
+ 0x21, 0x04, 0x22, 0x04, 0x12,
+ 0x04, 0x23, 0x04, 0x19, 0x04,
+ 0x22, 0x04, 0x15 };
+
+static unsigned char send_ussd_161[] = { 0xD0, 0x81, 0xFD, 0x81, 0x03, 0x01,
+ 0x12, 0x00, 0x82, 0x02, 0x81,
+ 0x83, 0x85, 0x81, 0xB6, 0x6F,
+ 0x6E, 0x63, 0x65, 0x20, 0x61,
+ 0x20, 0x52, 0x45, 0x4C, 0x45,
+ 0x41, 0x53, 0x45, 0x20, 0x43,
+ 0x4F, 0x4D, 0x50, 0x4C, 0x45,
+ 0x54, 0x45, 0x20, 0x6D, 0x65,
+ 0x73, 0x73, 0x61, 0x67, 0x65,
+ 0x20, 0x63, 0x6F, 0x6E, 0x74,
+ 0x61, 0x69, 0x6E, 0x69, 0x6E,
+ 0x67, 0x20, 0x74, 0x68, 0x65,
+ 0x20, 0x55, 0x53, 0x53, 0x44,
+ 0x20, 0x52, 0x65, 0x74, 0x75,
+ 0x72, 0x6E, 0x20, 0x52, 0x65,
+ 0x73, 0x75, 0x6C, 0x74, 0x20,
+ 0x6D, 0x65, 0x73, 0x73, 0x61,
+ 0x67, 0x65, 0x20, 0x6E, 0x6F,
+ 0x74, 0x20, 0x63, 0x6F, 0x6E,
+ 0x74, 0x61, 0x69, 0x6E, 0x69,
+ 0x6E, 0x67, 0x20, 0x61, 0x6E,
+ 0x20, 0x65, 0x72, 0x72, 0x6F,
+ 0x72, 0x20, 0x68, 0x61, 0x73,
+ 0x20, 0x62, 0x65, 0x65, 0x6E,
+ 0x20, 0x72, 0x65, 0x63, 0x65,
+ 0x69, 0x76, 0x65, 0x64, 0x20,
+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x6D, 0x2B, 0x2C,
+ 0x1E, 0x93, 0xCB, 0xE6, 0x33,
+ 0x3A, 0xAD, 0x5E, 0xB3, 0xDB,
+ 0xEE, 0x37, 0x3C, 0x2E, 0x9F,
+ 0xD3, 0xEB, 0xF6, 0x3B, 0x3E,
+ 0xAF, 0x6F, 0xC5, 0x64, 0x33,
+ 0x5A, 0xCD, 0x76, 0xC3, 0xE5,
+ 0x60, 0x9E, 0x02, 0x01, 0x01 };
+
+static unsigned char send_ussd_241[] = { 0xD0, 0x48, 0x81, 0x03, 0x01, 0x12,
+ 0x00, 0x82, 0x02, 0x81, 0x83,
+ 0x8A, 0x39, 0xF0, 0x41, 0xE1,
+ 0x90, 0x58, 0x34, 0x1E, 0x91,
+ 0x49, 0xE5, 0x92, 0xD9, 0x74,
+ 0x3E, 0xA1, 0x51, 0xE9, 0x94,
+ 0x5A, 0xB5, 0x5E, 0xB1, 0x59,
+ 0x6D, 0x2B, 0x2C, 0x1E, 0x93,
+ 0xCB, 0xE6, 0x33, 0x3A, 0xAD,
+ 0x5E, 0xB3, 0xDB, 0xEE, 0x37,
+ 0x3C, 0x2E, 0x9F, 0xD3, 0xEB,
+ 0xF6, 0x3B, 0x3E, 0xAF, 0x6F,
+ 0xC5, 0x64, 0x33, 0x5A, 0xCD,
+ 0x76, 0xC3, 0xE5, 0x60, 0x9E,
+ 0x02, 0x01, 0x01 };
+
+static unsigned char send_ussd_311[] = { 0xD0, 0x5F, 0x81, 0x03, 0x01, 0x12,
+ 0x00, 0x82, 0x02, 0x81, 0x83,
+ 0x85, 0x19, 0x80, 0x04, 0x17,
+ 0x04, 0x14, 0x04, 0x20, 0x04,
+ 0x10, 0x04, 0x12, 0x04, 0x21,
+ 0x04, 0x22, 0x04, 0x12, 0x04,
+ 0x23, 0x04, 0x19, 0x04, 0x22,
+ 0x04, 0x15, 0x8A, 0x39, 0xF0,
+ 0x41, 0xE1, 0x90, 0x58, 0x34,
+ 0x1E, 0x91, 0x49, 0xE5, 0x92,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xAF, 0x6F, 0xC5, 0x64,
+ 0x33, 0x5A, 0xCD, 0x76, 0xC3,
+ 0xE5, 0x60, 0xD0, 0x04, 0x00,
+ 0x10, 0x02, 0xB4 };
+
+static unsigned char send_ussd_432[] = { 0xD0, 0x56, 0x81, 0x03, 0x01, 0x12,
+ 0x00, 0x82, 0x02, 0x81, 0x83,
+ 0x85, 0x10, 0x54, 0x65, 0x78,
+ 0x74, 0x20, 0x41, 0x74, 0x74,
+ 0x72, 0x69, 0x62, 0x75, 0x74,
+ 0x65, 0x20, 0x32, 0x8A, 0x39,
+ 0xF0, 0x41, 0xE1, 0x90, 0x58,
+ 0x34, 0x1E, 0x91, 0x49, 0xE5,
+ 0x92, 0xD9, 0x74, 0x3E, 0xA1,
+ 0x51, 0xE9, 0x94, 0x5A, 0xB5,
+ 0x5E, 0xB1, 0x59, 0x6D, 0x2B,
+ 0x2C, 0x1E, 0x93, 0xCB, 0xE6,
+ 0x33, 0x3A, 0xAD, 0x5E, 0xB3,
+ 0xDB, 0xEE, 0x37, 0x3C, 0x2E,
+ 0x9F, 0xD3, 0xEB, 0xF6, 0x3B,
+ 0x3E, 0xAF, 0x6F, 0xC5, 0x64,
+ 0x33, 0x5A, 0xCD, 0x76, 0xC3,
+ 0xE5, 0x60 };
+
+static unsigned char send_ussd_441[] = { 0xD0, 0x5C, 0x81, 0x03, 0x01, 0x12,
+ 0x00, 0x82, 0x02, 0x81, 0x83,
+ 0x85, 0x10, 0x54, 0x65, 0x78,
+ 0x74, 0x20, 0x41, 0x74, 0x74,
+ 0x72, 0x69, 0x62, 0x75, 0x74,
+ 0x65, 0x20, 0x31, 0x8A, 0x39,
+ 0xF0, 0x41, 0xE1, 0x90, 0x58,
+ 0x34, 0x1E, 0x91, 0x49, 0xE5,
+ 0x92, 0xD9, 0x74, 0x3E, 0xA1,
+ 0x51, 0xE9, 0x94, 0x5A, 0xB5,
+ 0x5E, 0xB1, 0x59, 0x6D, 0x2B,
+ 0x2C, 0x1E, 0x93, 0xCB, 0xE6,
+ 0x33, 0x3A, 0xAD, 0x5E, 0xB3,
+ 0xDB, 0xEE, 0x37, 0x3C, 0x2E,
+ 0x9F, 0xD3, 0xEB, 0xF6, 0x3B,
+ 0x3E, 0xAF, 0x6F, 0xC5, 0x64,
+ 0x33, 0x5A, 0xCD, 0x76, 0xC3,
+ 0xE5, 0x60, 0xD0, 0x04, 0x00,
+ 0x10, 0x04, 0xB4 };
+
+static unsigned char send_ussd_442[] = { 0xD0, 0x5C, 0x81, 0x03, 0x01, 0x12,
+ 0x00, 0x82, 0x02, 0x81, 0x83,
+ 0x85, 0x10, 0x54, 0x65, 0x78,
+ 0x74, 0x20, 0x41, 0x74, 0x74,
+ 0x72, 0x69, 0x62, 0x75, 0x74,
+ 0x65, 0x20, 0x32, 0x8A, 0x39,
+ 0xF0, 0x41, 0xE1, 0x90, 0x58,
+ 0x34, 0x1E, 0x91, 0x49, 0xE5,
+ 0x92, 0xD9, 0x74, 0x3E, 0xA1,
+ 0x51, 0xE9, 0x94, 0x5A, 0xB5,
+ 0x5E, 0xB1, 0x59, 0x6D, 0x2B,
+ 0x2C, 0x1E, 0x93, 0xCB, 0xE6,
+ 0x33, 0x3A, 0xAD, 0x5E, 0xB3,
+ 0xDB, 0xEE, 0x37, 0x3C, 0x2E,
+ 0x9F, 0xD3, 0xEB, 0xF6, 0x3B,
+ 0x3E, 0xAF, 0x6F, 0xC5, 0x64,
+ 0x33, 0x5A, 0xCD, 0x76, 0xC3,
+ 0xE5, 0x60, 0xD0, 0x04, 0x00,
+ 0x10, 0x00, 0xB4 };
+
+static unsigned char send_ussd_443[] = { 0xD0, 0x56, 0x81, 0x03, 0x01, 0x12,
+ 0x00, 0x82, 0x02, 0x81, 0x83,
+ 0x85, 0x10, 0x54, 0x65, 0x78,
+ 0x74, 0x20, 0x41, 0x74, 0x74,
+ 0x72, 0x69, 0x62, 0x75, 0x74,
+ 0x65, 0x20, 0x33, 0x8A, 0x39,
+ 0xF0, 0x41, 0xE1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D, 0x76, 0xC3,
+ 0xE5, 0x60 };
+
+static unsigned char send_ussd_461[] = { 0xD0, 0x5C, 0x81, 0x03, 0x01, 0x12,
+ 0x00, 0x82, 0x02, 0x81, 0x83,
+ 0x85, 0x10, 0x54, 0x65, 0x78,
+ 0x74, 0x20, 0x41, 0x74, 0x74,
+ 0x72, 0x69, 0x62, 0x75, 0x74,
+ 0x65, 0x20, 0x31, 0x8A, 0x39,
+ 0xF0, 0x41, 0xE1, 0x90, 0x58,
+ 0x34, 0x1E, 0x91, 0x49, 0xE5,
+ 0x92, 0xD9, 0x74, 0x3E, 0xA1,
+ 0x51, 0xE9, 0x94, 0x5A, 0xB5,
+ 0x5E, 0xB1, 0x59, 0x6D, 0x2B,
+ 0x2C, 0x1E, 0x93, 0xCB, 0xE6,
+ 0x33, 0x3A, 0xAD, 0x5E, 0xB3,
+ 0xDB, 0xEE, 0x37, 0x3C, 0x2E,
+ 0x9F, 0xD3, 0xEB, 0xF6, 0x3B,
+ 0x3E, 0xAF, 0x6F, 0xC5, 0x64,
+ 0x33, 0x5A, 0xCD, 0x76, 0xC3,
+ 0xE5, 0x60, 0xD0, 0x04, 0x00,
+ 0x10, 0x10, 0xB4 };
+
+static unsigned char send_ussd_462[] = { 0xD0, 0x5C, 0x81, 0x03, 0x01, 0x12,
+ 0x00, 0x82, 0x02, 0x81, 0x83,
+ 0x85, 0x10, 0x54, 0x65, 0x78,
+ 0x74, 0x20, 0x41, 0x74, 0x74,
+ 0x72, 0x69, 0x62, 0x75, 0x74,
+ 0x65, 0x20, 0x32, 0x8A, 0x39,
+ 0xF0, 0x41, 0xE1, 0x90, 0x58,
+ 0x34, 0x1E, 0x91, 0x49, 0xE5,
+ 0x92, 0xD9, 0x74, 0x3E, 0xA1,
+ 0x51, 0xE9, 0x94, 0x5A, 0xB5,
+ 0x5E, 0xB1, 0x59, 0x6D, 0x2B,
+ 0x2C, 0x1E, 0x93, 0xCB, 0xE6,
+ 0x33, 0x3A, 0xAD, 0x5E, 0xB3,
+ 0xDB, 0xEE, 0x37, 0x3C, 0x2E,
+ 0x9F, 0xD3, 0xEB, 0xF6, 0x3B,
+ 0x3E, 0xAF, 0x6F, 0xC5, 0x64,
+ 0x33, 0x5A, 0xCD, 0x76, 0xC3,
+ 0xE5, 0x60, 0xD0, 0x04, 0x00,
+ 0x10, 0x00, 0xB4 };
+
+static unsigned char send_ussd_463[] = { 0xD0, 0x56, 0x81, 0x03, 0x01, 0x12,
+ 0x00, 0x82, 0x02, 0x81, 0x83,
+ 0x85, 0x10, 0x54, 0x65, 0x78,
+ 0x74, 0x20, 0x41, 0x74, 0x74,
+ 0x72, 0x69, 0x62, 0x75, 0x74,
+ 0x65, 0x20, 0x33, 0x8A, 0x39,
+ 0xF0, 0x41, 0xE1, 0x90, 0x58,
+ 0x34, 0x1E, 0x91, 0x49, 0xE5,
+ 0x92, 0xD9, 0x74, 0x3E, 0xA1,
+ 0x51, 0xE9, 0x94, 0x5A, 0xB5,
+ 0x5E, 0xB1, 0x59, 0x6D, 0x2B,
+ 0x2C, 0x1E, 0x93, 0xCB, 0xE6,
+ 0x33, 0x3A, 0xAD, 0x5E, 0xB3,
+ 0xDB, 0xEE, 0x37, 0x3C, 0x2E,
+ 0x9F, 0xD3, 0xEB, 0xF6, 0x3B,
+ 0x3E, 0xAF, 0x6F, 0xC5, 0x64,
+ 0x33, 0x5A, 0xCD, 0x76, 0xC3,
+ 0xE5, 0x60 };
+
+static unsigned char send_ussd_471[] = { 0xD0, 0x5C, 0x81, 0x03, 0x01, 0x12,
+ 0x00, 0x82, 0x02, 0x81, 0x83,
+ 0x85, 0x10, 0x54, 0x65, 0x78,
+ 0x74, 0x20, 0x41, 0x74, 0x74,
+ 0x72, 0x69, 0x62, 0x75, 0x74,
+ 0x65, 0x20, 0x31, 0x8A, 0x39,
+ 0xF0, 0x41, 0xE1, 0x90, 0x58,
+ 0x34, 0x1E, 0x91, 0x49, 0xE5,
+ 0x92, 0xD9, 0x74, 0x3E, 0xA1,
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+ 0x9F, 0xD3, 0xEB, 0xF6, 0x3B,
+ 0x3E, 0xAF, 0x6F, 0xC5, 0x64,
+ 0x33, 0x5A, 0xCD, 0x76, 0xC3,
+ 0xE5, 0x60 };
+
+static unsigned char send_ussd_491[] = { 0xD0, 0x5C, 0x81, 0x03, 0x01, 0x12,
+ 0x00, 0x82, 0x02, 0x81, 0x83,
+ 0x85, 0x10, 0x54, 0x65, 0x78,
+ 0x74, 0x20, 0x41, 0x74, 0x74,
+ 0x72, 0x69, 0x62, 0x75, 0x74,
+ 0x65, 0x20, 0x31, 0x8A, 0x39,
+ 0xF0, 0x41, 0xE1, 0x90, 0x58,
+ 0x34, 0x1E, 0x91, 0x49, 0xE5,
+ 0x92, 0xD9, 0x74, 0x3E, 0xA1,
+ 0x51, 0xE9, 0x94, 0x5A, 0xB5,
+ 0x5E, 0xB1, 0x59, 0x6D, 0x2B,
+ 0x2C, 0x1E, 0x93, 0xCB, 0xE6,
+ 0x33, 0x3A, 0xAD, 0x5E, 0xB3,
+ 0xDB, 0xEE, 0x37, 0x3C, 0x2E,
+ 0x9F, 0xD3, 0xEB, 0xF6, 0x3B,
+ 0x3E, 0xAF, 0x6F, 0xC5, 0x64,
+ 0x33, 0x5A, 0xCD, 0x76, 0xC3,
+ 0xE5, 0x60, 0xD0, 0x04, 0x00,
+ 0x10, 0x80, 0xB4 };
+
+static unsigned char send_ussd_492[] = { 0xD0, 0x5C, 0x81, 0x03, 0x01, 0x12,
+ 0x00, 0x82, 0x02, 0x81, 0x83,
+ 0x85, 0x10, 0x54, 0x65, 0x78,
+ 0x74, 0x20, 0x41, 0x74, 0x74,
+ 0x72, 0x69, 0x62, 0x75, 0x74,
+ 0x65, 0x20, 0x32, 0x8A, 0x39,
+ 0xF0, 0x41, 0xE1, 0x90, 0x58,
+ 0x34, 0x1E, 0x91, 0x49, 0xE5,
+ 0x92, 0xD9, 0x74, 0x3E, 0xA1,
+ 0x51, 0xE9, 0x94, 0x5A, 0xB5,
+ 0x5E, 0xB1, 0x59, 0x6D, 0x2B,
+ 0x2C, 0x1E, 0x93, 0xCB, 0xE6,
+ 0x33, 0x3A, 0xAD, 0x5E, 0xB3,
+ 0xDB, 0xEE, 0x37, 0x3C, 0x2E,
+ 0x9F, 0xD3, 0xEB, 0xF6, 0x3B,
+ 0x3E, 0xAF, 0x6F, 0xC5, 0x64,
+ 0x33, 0x5A, 0xCD, 0x76, 0xC3,
+ 0xE5, 0x60, 0xD0, 0x04, 0x00,
+ 0x10, 0x00, 0xB4 };
+
+static unsigned char send_ussd_493[] = { 0xD0, 0x56, 0x81, 0x03, 0x01, 0x12,
+ 0x00, 0x82, 0x02, 0x81, 0x83,
+ 0x85, 0x10, 0x54, 0x65, 0x78,
+ 0x74, 0x20, 0x41, 0x74, 0x74,
+ 0x72, 0x69, 0x62, 0x75, 0x74,
+ 0x65, 0x20, 0x33, 0x8A, 0x39,
+ 0xF0, 0x41, 0xE1, 0x90, 0x58,
+ 0x34, 0x1E, 0x91, 0x49, 0xE5,
+ 0x92, 0xD9, 0x74, 0x3E, 0xA1,
+ 0x51, 0xE9, 0x94, 0x5A, 0xB5,
+ 0x5E, 0xB1, 0x59, 0x6D, 0x2B,
+ 0x2C, 0x1E, 0x93, 0xCB, 0xE6,
+ 0x33, 0x3A, 0xAD, 0x5E, 0xB3,
+ 0xDB, 0xEE, 0x37, 0x3C, 0x2E,
+ 0x9F, 0xD3, 0xEB, 0xF6, 0x3B,
+ 0x3E, 0xAF, 0x6F, 0xC5, 0x64,
+ 0x33, 0x5A, 0xCD, 0x76, 0xC3,
+ 0xE5, 0x60 };
+
+static unsigned char send_ussd_4101[] = { 0xD0, 0x5C, 0x81, 0x03, 0x01, 0x12,
+ 0x00, 0x82, 0x02, 0x81, 0x83,
+ 0x85, 0x10, 0x54, 0x65, 0x78,
+ 0x74, 0x20, 0x41, 0x74, 0x74,
+ 0x72, 0x69, 0x62, 0x75, 0x74,
+ 0x65, 0x20, 0x31, 0x8A, 0x39,
+ 0xF0,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+ 0x85, 0x05, 0x80, 0x4F, 0x60,
+ 0x59, 0x7D, 0x8A, 0x39, 0xF0,
+ 0x41, 0xE1, 0x90, 0x58, 0x34,
+ 0x1E, 0x91, 0x49, 0xE5, 0x92,
+ 0xD9, 0x74, 0x3E, 0xA1, 0x51,
+ 0xE9, 0x94, 0x5A, 0xB5, 0x5E,
+ 0xB1, 0x59, 0x6D, 0x2B, 0x2C,
+ 0x1E, 0x93, 0xCB, 0xE6, 0x33,
+ 0x3A, 0xAD, 0x5E, 0xB3, 0xDB,
+ 0xEE, 0x37, 0x3C, 0x2E, 0x9F,
+ 0xD3, 0xEB, 0xF6, 0x3B, 0x3E,
+ 0xAF, 0x6F, 0xC5, 0x64, 0x33,
+ 0x5A, 0xCD, 0x76, 0xC3, 0xE5,
+ 0x60 };
+
+static unsigned char send_ussd_611[] = { 0xD0, 0x49, 0x81, 0x03, 0x01, 0x12,
+ 0x00, 0x82, 0x02, 0x81, 0x83,
+ 0x85, 0x03, 0x80, 0x30, 0xEB,
+ 0x8A, 0x39, 0xF0, 0x41, 0xE1,
+ 0x90, 0x58, 0x34, 0x1E, 0x91,
+ 0x49, 0xE5, 0x92, 0xD9, 0x74,
+ 0x3E, 0xA1, 0x51, 0xE9, 0x94,
+ 0x5A, 0xB5, 0x5E, 0xB1, 0x59,
+ 0x6D, 0x2B, 0x2C, 0x1E, 0x93,
+ 0xCB, 0xE6, 0x33, 0x3A, 0xAD,
+ 0x5E, 0xB3, 0xDB, 0xEE, 0x37,
+ 0x3C, 0x2E, 0x9F, 0xD3, 0xEB,
+ 0xF6, 0x3B, 0x3E, 0xAF, 0x6F,
+ 0xC5, 0x64, 0x33, 0x5A, 0xCD,
+ 0x76, 0xC3, 0xE5, 0x60 };
+
+static struct send_ussd_test send_ussd_data_111 = {
+ .pdu = send_ussd_111,
+ .pdu_len = sizeof(send_ussd_111),
+ .qualifier = 0x00,
+ .alpha_id = "7-bit USSD",
+ .ussd = "ABCDEFGHIJKLMNOPQRSTUVWXYZ-abcdefghijklmnopqrstuvwxyz-"
+ "1234567890"
+};
+
+static struct send_ussd_test send_ussd_data_121 = {
+ .pdu = send_ussd_121,
+ .pdu_len = sizeof(send_ussd_121),
+ .qualifier = 0x00,
+ .alpha_id = "8-bit USSD",
+ .ussd = "ABCDEFGHIJKLMNOPQRSTUVWXYZ-abcdefghijklmnopqrstuvwxyz-"
+ "1234567890"
+};
+
+static struct send_ussd_test send_ussd_data_131 = {
+ .pdu = send_ussd_131,
+ .pdu_len = sizeof(send_ussd_131),
+ .qualifier = 0x00,
+ .alpha_id = "UCS2 USSD",
+ .ussd = "ЗДРАВСТВУЙТЕ"
+};
+
+static struct send_ussd_test send_ussd_data_161 = {
+ .pdu = send_ussd_161,
+ .pdu_len = sizeof(send_ussd_161),
+ .qualifier = 0x00,
+ .alpha_id = "once a RELEASE COMPLETE message containing the USSD "
+ "Return Result message not containing an error has been "
+ "received from the network, the ME shall inform the SIM "
+ "that the command has",
+ .ussd = "ABCDEFGHIJKLMNOPQRSTUVWXYZ-abcdefghijklmnopqrstuvwxyz-"
+ "1234567890"
+};
+
+static struct send_ussd_test send_ussd_data_171 = {
+ .pdu = send_ussd_171,
+ .pdu_len = sizeof(send_ussd_171),
+ .qualifier = 0x00,
+ .ussd = "ABCDEFGHIJKLMNOPQRSTUVWXYZ-abcdefghijklmnopqrstuvwxyz-"
+ "1234567890"
+};
+
+static struct send_ussd_test send_ussd_data_181 = {
+ .pdu = send_ussd_181,
+ .pdu_len = sizeof(send_ussd_181),
+ .qualifier = 0x00,
+ .ussd = "ABCDEFGHIJKLMNOPQRSTUVWXYZ-abcdefghijklmnopqrstuvwxyz-"
+ "1234567890"
+};
+
+static struct send_ussd_test send_ussd_data_211 = {
+ .pdu = send_ussd_211,
+ .pdu_len = sizeof(send_ussd_211),
+ .qualifier = 0x00,
+ .alpha_id = "Basic Icon",
+ .ussd = "ABCDEFGHIJKLMNOPQRSTUVWXYZ-abcdefghijklmnopqrstuvwxyz-"
+ "1234567890",
+ .icon_id = {
+ .qualifier = STK_ICON_QUALIFIER_TYPE_SELF_EXPLANATORY,
+ .id = 0x01
+ }
+};
+
+static struct send_ussd_test send_ussd_data_221 = {
+ .pdu = send_ussd_221,
+ .pdu_len = sizeof(send_ussd_221),
+ .qualifier = 0x00,
+ .alpha_id = "Color Icon",
+ .ussd = "ABCDEFGHIJKLMNOPQRSTUVWXYZ-abcdefghijklmnopqrstuvwxyz-"
+ "1234567890",
+ .icon_id = {
+ .qualifier = STK_ICON_QUALIFIER_TYPE_SELF_EXPLANATORY,
+ .id = 0x02
+ }
+};
+
+static struct send_ussd_test send_ussd_data_231 = {
+ .pdu = send_ussd_231,
+ .pdu_len = sizeof(send_ussd_231),
+ .qualifier = 0x00,
+ .alpha_id = "Basic Icon",
+ .ussd = "ABCDEFGHIJKLMNOPQRSTUVWXYZ-abcdefghijklmnopqrstuvwxyz-"
+ "1234567890",
+ .icon_id = {
+ .qualifier = STK_ICON_QUALIFIER_TYPE_NON_SELF_EXPLANATORY,
+ .id = 0x01
+ }
+};
+
+static struct send_ussd_test send_ussd_data_241 = {
+ .pdu = send_ussd_241,
+ .pdu_len = sizeof(send_ussd_241),
+ .qualifier = 0x00,
+ .ussd = "ABCDEFGHIJKLMNOPQRSTUVWXYZ-abcdefghijklmnopqrstuvwxyz-"
+ "1234567890",
+ .icon_id = {
+ .qualifier = STK_ICON_QUALIFIER_TYPE_NON_SELF_EXPLANATORY,
+ .id = 0x01
+ }
+};
+
+/* The ussd is not complete in spec */
+static struct send_ussd_test send_ussd_data_311 = {
+ .pdu = send_ussd_311,
+ .pdu_len = sizeof(send_ussd_311),
+ .qualifier = 0x00,
+ .alpha_id = "ЗДРАВСТВУЙТЕ",
+ .ussd = "ABCDEFGHIJKLMNOPQRSTUVWXYZ-abcdefghijklmnopqrstuvwxyz-"
+ "1234567890"
+};
+
+static struct send_ussd_test send_ussd_data_411 = {
+ .pdu = send_ussd_411,
+ .pdu_len = sizeof(send_ussd_411),
+ .qualifier = 0x00,
+ .alpha_id = "Text Attribute 1",
+ .ussd = "ABCDEFGHIJKLMNOPQRSTUVWXYZ-abcdefghijklmnopqrstuvwxyz-"
+ "1234567890",
+ .text_attr = {
+ .len = 4,
+ .attributes = { 0x00, 0x10, 0x00, 0xB4 }
+ }
+};
+
+static struct send_ussd_test send_ussd_data_412 = {
+ .pdu = send_ussd_412,
+ .pdu_len = sizeof(send_ussd_412),
+ .qualifier = 0x00,
+ .alpha_id = "Text Attribute 2",
+ .ussd = "ABCDEFGHIJKLMNOPQRSTUVWXYZ-abcdefghijklmnopqrstuvwxyz-"
+ "1234567890"
+};
+
+static struct send_ussd_test send_ussd_data_421 = {
+ .pdu = send_ussd_421,
+ .pdu_len = sizeof(send_ussd_421),
+ .qualifier = 0x00,
+ .alpha_id = "Text Attribute 1",
+ .ussd = "ABCDEFGHIJKLMNOPQRSTUVWXYZ-abcdefghijklmnopqrstuvwxyz-"
+ "1234567890",
+ .text_attr = {
+ .len = 4,
+ .attributes = { 0x00, 0x10, 0x01, 0xB4 }
+ }
+};
+
+static struct send_ussd_test send_ussd_data_422 = {
+ .pdu = send_ussd_422,
+ .pdu_len = sizeof(send_ussd_422),
+ .qualifier = 0x00,
+ .alpha_id = "Text Attribute 2",
+ .ussd = "ABCDEFGHIJKLMNOPQRSTUVWXYZ-abcdefghijklmnopqrstuvwxyz-"
+ "1234567890"
+};
+
+static struct send_ussd_test send_ussd_data_431 = {
+ .pdu = send_ussd_431,
+ .pdu_len = sizeof(send_ussd_431),
+ .qualifier = 0x00,
+ .alpha_id = "Text Attribute 1",
+ .ussd = "ABCDEFGHIJKLMNOPQRSTUVWXYZ-abcdefghijklmnopqrstuvwxyz-"
+ "1234567890",
+ .text_attr = {
+ .len = 4,
+ .attributes = { 0x00, 0x10, 0x02, 0xB4 }
+ }
+};
+
+static struct send_ussd_test send_ussd_data_432 = {
+ .pdu = send_ussd_432,
+ .pdu_len = sizeof(send_ussd_432),
+ .qualifier = 0x00,
+ .alpha_id = "Text Attribute 2",
+ .ussd = "ABCDEFGHIJKLMNOPQRSTUVWXYZ-abcdefghijklmnopqrstuvwxyz-"
+ "1234567890"
+};
+
+static struct send_ussd_test send_ussd_data_441 = {
+ .pdu = send_ussd_441,
+ .pdu_len = sizeof(send_ussd_441),
+ .qualifier = 0x00,
+ .alpha_id = "Text Attribute 1",
+ .ussd = "ABCDEFGHIJKLMNOPQRSTUVWXYZ-abcdefghijklmnopqrstuvwxyz-"
+ "1234567890",
+ .text_attr = {
+ .len = 4,
+ .attributes = { 0x00, 0x10, 0x04, 0xB4 }
+ }
+};
+
+static struct send_ussd_test send_ussd_data_442 = {
+ .pdu = send_ussd_442,
+ .pdu_len = sizeof(send_ussd_442),
+ .qualifier = 0x00,
+ .alpha_id = "Text Attribute 2",
+ .ussd = "ABCDEFGHIJKLMNOPQRSTUVWXYZ-abcdefghijklmnopqrstuvwxyz-"
+ "1234567890",
+ .text_attr = {
+ .len = 4,
+ .attributes = { 0x00, 0x10, 0x00, 0xB4 }
+ }
+};
+
+static struct send_ussd_test send_ussd_data_443 = {
+ .pdu = send_ussd_443,
+ .pdu_len = sizeof(send_ussd_443),
+ .qualifier = 0x00,
+ .alpha_id = "Text Attribute 3",
+ .ussd = "ABCDEFGHIJKLMNOPQRSTUVWXYZ-abcdefghijklmnopqrstuvwxyz-"
+ "1234567890"
+};
+
+static struct send_ussd_test send_ussd_data_451 = {
+ .pdu = send_ussd_451,
+ .pdu_len = sizeof(send_ussd_451),
+ .qualifier = 0x00,
+ .alpha_id = "Text Attribute 1",
+ .ussd = "ABCDEFGHIJKLMNOPQRSTUVWXYZ-abcdefghijklmnopqrstuvwxyz-"
+ "1234567890",
+ .text_attr = {
+ .len = 4,
+ .attributes = { 0x00, 0x10, 0x08, 0xB4 }
+ }
+};
+
+static struct send_ussd_test send_ussd_data_452 = {
+ .pdu = send_ussd_452,
+ .pdu_len = sizeof(send_ussd_452),
+ .qualifier = 0x00,
+ .alpha_id = "Text Attribute 2",
+ .ussd = "ABCDEFGHIJKLMNOPQRSTUVWXYZ-abcdefghijklmnopqrstuvwxyz-"
+ "1234567890",
+ .text_attr = {
+ .len = 4,
+ .attributes = { 0x00, 0x10, 0x00, 0xB4 }
+ }
+};
+
+static struct send_ussd_test send_ussd_data_453 = {
+ .pdu = send_ussd_453,
+ .pdu_len = sizeof(send_ussd_453),
+ .qualifier = 0x00,
+ .alpha_id = "Text Attribute 3",
+ .ussd = "ABCDEFGHIJKLMNOPQRSTUVWXYZ-abcdefghijklmnopqrstuvwxyz-"
+ "1234567890"
+};
+
+static struct send_ussd_test send_ussd_data_461 = {
+ .pdu = send_ussd_461,
+ .pdu_len = sizeof(send_ussd_461),
+ .qualifier = 0x00,
+ .alpha_id = "Text Attribute 1",
+ .ussd = "ABCDEFGHIJKLMNOPQRSTUVWXYZ-abcdefghijklmnopqrstuvwxyz-"
+ "1234567890",
+ .text_attr = {
+ .len = 4,
+ .attributes = { 0x00, 0x10, 0x10, 0xB4 }
+ }
+};
+
+static struct send_ussd_test send_ussd_data_462 = {
+ .pdu = send_ussd_462,
+ .pdu_len = sizeof(send_ussd_462),
+ .qualifier = 0x00,
+ .alpha_id = "Text Attribute 2",
+ .ussd = "ABCDEFGHIJKLMNOPQRSTUVWXYZ-abcdefghijklmnopqrstuvwxyz-"
+ "1234567890",
+ .text_attr = {
+ .len = 4,
+ .attributes = { 0x00, 0x10, 0x00, 0xB4 }
+ }
+};
+
+static struct send_ussd_test send_ussd_data_463 = {
+ .pdu = send_ussd_463,
+ .pdu_len = sizeof(send_ussd_463),
+ .qualifier = 0x00,
+ .alpha_id = "Text Attribute 3",
+ .ussd = "ABCDEFGHIJKLMNOPQRSTUVWXYZ-abcdefghijklmnopqrstuvwxyz-"
+ "1234567890"
+};
+
+static struct send_ussd_test send_ussd_data_471 = {
+ .pdu = send_ussd_471,
+ .pdu_len = sizeof(send_ussd_471),
+ .qualifier = 0x00,
+ .alpha_id = "Text Attribute 1",
+ .ussd = "ABCDEFGHIJKLMNOPQRSTUVWXYZ-abcdefghijklmnopqrstuvwxyz-"
+ "1234567890",
+ .text_attr = {
+ .len = 4,
+ .attributes = { 0x00, 0x10, 0x20, 0xB4 }
+ }
+};
+
+static struct send_ussd_test send_ussd_data_472 = {
+ .pdu = send_ussd_472,
+ .pdu_len = sizeof(send_ussd_472),
+ .qualifier = 0x00,
+ .alpha_id = "Text Attribute 2",
+ .ussd = "ABCDEFGHIJKLMNOPQRSTUVWXYZ-abcdefghijklmnopqrstuvwxyz-"
+ "1234567890",
+ .text_attr = {
+ .len = 4,
+ .attributes = { 0x00, 0x10, 0x00, 0xB4 }
+ }
+};
+
+static struct send_ussd_test send_ussd_data_473 = {
+ .pdu = send_ussd_473,
+ .pdu_len = sizeof(send_ussd_473),
+ .qualifier = 0x00,
+ .alpha_id = "Text Attribute 3",
+ .ussd = "ABCDEFGHIJKLMNOPQRSTUVWXYZ-abcdefghijklmnopqrstuvwxyz-"
+ "1234567890"
+};
+
+static struct send_ussd_test send_ussd_data_481 = {
+ .pdu = send_ussd_481,
+ .pdu_len = sizeof(send_ussd_481),
+ .qualifier = 0x00,
+ .alpha_id = "Text Attribute 1",
+ .ussd = "ABCDEFGHIJKLMNOPQRSTUVWXYZ-abcdefghijklmnopqrstuvwxyz-"
+ "1234567890",
+ .text_attr = {
+ .len = 4,
+ .attributes = { 0x00, 0x10, 0x40, 0xB4 }
+ }
+};
+
+static struct send_ussd_test send_ussd_data_482 = {
+ .pdu = send_ussd_482,
+ .pdu_len = sizeof(send_ussd_482),
+ .qualifier = 0x00,
+ .alpha_id = "Text Attribute 2",
+ .ussd = "ABCDEFGHIJKLMNOPQRSTUVWXYZ-abcdefghijklmnopqrstuvwxyz-"
+ "1234567890",
+ .text_attr = {
+ .len = 4,
+ .attributes = { 0x00, 0x10, 0x00, 0xB4 }
+ }
+};
+
+static struct send_ussd_test send_ussd_data_483 = {
+ .pdu = send_ussd_483,
+ .pdu_len = sizeof(send_ussd_483),
+ .qualifier = 0x00,
+ .alpha_id = "Text Attribute 3",
+ .ussd = "ABCDEFGHIJKLMNOPQRSTUVWXYZ-abcdefghijklmnopqrstuvwxyz-"
+ "1234567890"
+};
+
+static struct send_ussd_test send_ussd_data_491 = {
+ .pdu = send_ussd_491,
+ .pdu_len = sizeof(send_ussd_491),
+ .qualifier = 0x00,
+ .alpha_id = "Text Attribute 1",
+ .ussd = "ABCDEFGHIJKLMNOPQRSTUVWXYZ-abcdefghijklmnopqrstuvwxyz-"
+ "1234567890",
+ .text_attr = {
+ .len = 4,
+ .attributes = { 0x00, 0x10, 0x80, 0xB4 }
+ }
+};
+
+static struct send_ussd_test send_ussd_data_492 = {
+ .pdu = send_ussd_492,
+ .pdu_len = sizeof(send_ussd_492),
+ .qualifier = 0x00,
+ .alpha_id = "Text Attribute 2",
+ .ussd = "ABCDEFGHIJKLMNOPQRSTUVWXYZ-abcdefghijklmnopqrstuvwxyz-"
+ "1234567890",
+ .text_attr = {
+ .len = 4,
+ .attributes = { 0x00, 0x10, 0x00, 0xB4 }
+ }
+};
+
+static struct send_ussd_test send_ussd_data_493 = {
+ .pdu = send_ussd_493,
+ .pdu_len = sizeof(send_ussd_493),
+ .qualifier = 0x00,
+ .alpha_id = "Text Attribute 3",
+ .ussd = "ABCDEFGHIJKLMNOPQRSTUVWXYZ-abcdefghijklmnopqrstuvwxyz-"
+ "1234567890"
+};
+
+static struct send_ussd_test send_ussd_data_4101 = {
+ .pdu = send_ussd_4101,
+ .pdu_len = sizeof(send_ussd_4101),
+ .qualifier = 0x00,
+ .alpha_id = "Text Attribute 1",
+ .ussd = "ABCDEFGHIJKLMNOPQRSTUVWXYZ-abcdefghijklmnopqrstuvwxyz-"
+ "1234567890",
+ .text_attr = {
+ .len = 4,
+ .attributes = { 0x00, 0x10, 0x00, 0xB4 }
+ }
+};
+
+static struct send_ussd_test send_ussd_data_4102 = {
+ .pdu = send_ussd_4102,
+ .pdu_len = sizeof(send_ussd_4102),
+ .qualifier = 0x00,
+ .alpha_id = "Text Attribute 2",
+ .ussd = "ABCDEFGHIJKLMNOPQRSTUVWXYZ-abcdefghijklmnopqrstuvwxyz-"
+ "1234567890"
+};
+
+static struct send_ussd_test send_ussd_data_511 = {
+ .pdu = send_ussd_511,
+ .pdu_len = sizeof(send_ussd_511),
+ .qualifier = 0x00,
+ .alpha_id = "你好",
+ .ussd = "ABCDEFGHIJKLMNOPQRSTUVWXYZ-abcdefghijklmnopqrstuvwxyz-"
+ "1234567890"
+};
+
+static struct send_ussd_test send_ussd_data_611 = {
+ .pdu = send_ussd_611,
+ .pdu_len = sizeof(send_ussd_611),
+ .qualifier = 0x00,
+ .alpha_id = "ル",
+ .ussd = "ABCDEFGHIJKLMNOPQRSTUVWXYZ-abcdefghijklmnopqrstuvwxyz-"
+ "1234567890"
+};
+
+static void test_send_ussd(gconstpointer data)
+{
+ const struct send_ussd_test *test = data;
+ struct stk_command *command;
+
+ command = stk_command_new_from_pdu(test->pdu, test->pdu_len);
+
+ g_assert(command);
+
+ g_assert(command->number == 1);
+ g_assert(command->type == STK_COMMAND_TYPE_SEND_USSD);
+ g_assert(command->qualifier == test->qualifier);
+
+ g_assert(command->src == STK_DEVICE_IDENTITY_TYPE_UICC);
+ g_assert(command->dst == STK_DEVICE_IDENTITY_TYPE_NETWORK);
+
+ check_alpha_id(command->send_ussd.alpha_id, test->alpha_id);
+ check_ussd(&command->send_ussd.ussd_string, test->ussd);
+ check_icon_id(&command->send_ussd.icon_id, &test->icon_id);
+ check_text_attr(&command->send_ussd.text_attr, &test->text_attr);
+ check_frame_id(&command->send_ussd.frame_id, &test->frame_id);
+
+ stk_command_free(command);
+}
+
struct setup_call_test {
const unsigned char *pdu;
unsigned int pdu_len;
@@ -21551,6 +22791,85 @@ int main(int argc, char **argv)
g_test_add_data_func("/teststk/Send SS 6.1.1",
&send_ss_data_611, test_send_ss);
+ g_test_add_data_func("/teststk/Send USSD 1.1.1",
+ &send_ussd_data_111, test_send_ussd);
+ g_test_add_data_func("/teststk/Send USSD 1.2.1",
+ &send_ussd_data_121, test_send_ussd);
+ g_test_add_data_func("/teststk/Send USSD 1.3.1",
+ &send_ussd_data_131, test_send_ussd);
+ g_test_add_data_func("/teststk/Send USSD 1.6.1",
+ &send_ussd_data_161, test_send_ussd);
+ g_test_add_data_func("/teststk/Send USSD 1.7.1",
+ &send_ussd_data_171, test_send_ussd);
+ g_test_add_data_func("/teststk/Send USSD 1.8.1",
+ &send_ussd_data_181, test_send_ussd);
+ g_test_add_data_func("/teststk/Send USSD 2.1.1",
+ &send_ussd_data_211, test_send_ussd);
+ g_test_add_data_func("/teststk/Send USSD 2.2.1",
+ &send_ussd_data_221, test_send_ussd);
+ g_test_add_data_func("/teststk/Send USSD 2.3.1",
+ &send_ussd_data_231, test_send_ussd);
+ g_test_add_data_func("/teststk/Send USSD 2.4.1",
+ &send_ussd_data_241, test_send_ussd);
+ g_test_add_data_func("/teststk/Send USSD 3.1.1",
+ &send_ussd_data_311, test_send_ussd);
+ g_test_add_data_func("/teststk/Send USSD 4.1.1",
+ &send_ussd_data_411, test_send_ussd);
+ g_test_add_data_func("/teststk/Send USSD 4.1.2",
+ &send_ussd_data_412, test_send_ussd);
+ g_test_add_data_func("/teststk/Send USSD 4.2.1",
+ &send_ussd_data_421, test_send_ussd);
+ g_test_add_data_func("/teststk/Send USSD 4.2.2",
+ &send_ussd_data_422, test_send_ussd);
+ g_test_add_data_func("/teststk/Send USSD 4.3.1",
+ &send_ussd_data_431, test_send_ussd);
+ g_test_add_data_func("/teststk/Send USSD 4.3.2",
+ &send_ussd_data_432, test_send_ussd);
+ g_test_add_data_func("/teststk/Send USSD 4.4.1",
+ &send_ussd_data_441, test_send_ussd);
+ g_test_add_data_func("/teststk/Send USSD 4.4.2",
+ &send_ussd_data_442, test_send_ussd);
+ g_test_add_data_func("/teststk/Send USSD 4.4.3",
+ &send_ussd_data_443, test_send_ussd);
+ g_test_add_data_func("/teststk/Send USSD 4.5.1",
+ &send_ussd_data_451, test_send_ussd);
+ g_test_add_data_func("/teststk/Send USSD 4.5.2",
+ &send_ussd_data_452, test_send_ussd);
+ g_test_add_data_func("/teststk/Send USSD 4.5.3",
+ &send_ussd_data_453, test_send_ussd);
+ g_test_add_data_func("/teststk/Send USSD 4.6.1",
+ &send_ussd_data_461, test_send_ussd);
+ g_test_add_data_func("/teststk/Send USSD 4.6.2",
+ &send_ussd_data_462, test_send_ussd);
+ g_test_add_data_func("/teststk/Send USSD 4.6.3",
+ &send_ussd_data_463, test_send_ussd);
+ g_test_add_data_func("/teststk/Send USSD 4.7.1",
+ &send_ussd_data_471, test_send_ussd);
+ g_test_add_data_func("/teststk/Send USSD 4.7.2",
+ &send_ussd_data_472, test_send_ussd);
+ g_test_add_data_func("/teststk/Send USSD 4.7.3",
+ &send_ussd_data_473, test_send_ussd);
+ g_test_add_data_func("/teststk/Send USSD 4.8.1",
+ &send_ussd_data_481, test_send_ussd);
+ g_test_add_data_func("/teststk/Send USSD 4.8.2",
+ &send_ussd_data_482, test_send_ussd);
+ g_test_add_data_func("/teststk/Send USSD 4.8.3",
+ &send_ussd_data_483, test_send_ussd);
+ g_test_add_data_func("/teststk/Send USSD 4.9.1",
+ &send_ussd_data_491, test_send_ussd);
+ g_test_add_data_func("/teststk/Send USSD 4.9.2",
+ &send_ussd_data_492, test_send_ussd);
+ g_test_add_data_func("/teststk/Send USSD 4.9.3",
+ &send_ussd_data_493, test_send_ussd);
+ g_test_add_data_func("/teststk/Send USSD 4.10.1",
+ &send_ussd_data_4101, test_send_ussd);
+ g_test_add_data_func("/teststk/Send USSD 4.10.2",
+ &send_ussd_data_4102, test_send_ussd);
+ g_test_add_data_func("/teststk/Send USSD 5.1.1",
+ &send_ussd_data_511, test_send_ussd);
+ g_test_add_data_func("/teststk/Send USSD 6.1.1",
+ &send_ussd_data_611, test_send_ussd);
+
g_test_add_data_func("/teststk/Send SMS response 1.1.1",
&send_sms_response_data_111,
test_terminal_response_encoding);
--
1.7.0.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 3/5] Modify ussd parser
2010-06-17 10:35 [PATCH 1/5] stk: Add parser for send ussd commands Yang Gu
2010-06-17 10:35 ` [PATCH 2/5] teststk: Add test for send ussd parser Yang Gu
@ 2010-06-17 10:35 ` Yang Gu
2010-06-17 10:35 ` [PATCH 4/5] Refactor " Yang Gu
` (2 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: Yang Gu @ 2010-06-17 10:35 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 2116 bytes --]
* Original code doesn't call unpack_7bit(), which seems not correct.
* An utility function is used to handle it, which supports 8-bit
and ucs2 besides 7-bit character.
* Status is assigned with correct value when error occurs
---
drivers/atmodem/ussd.c | 32 +++++---------------------------
1 files changed, 5 insertions(+), 27 deletions(-)
diff --git a/drivers/atmodem/ussd.c b/drivers/atmodem/ussd.c
index 555ce13..4bb7031 100644
--- a/drivers/atmodem/ussd.c
+++ b/drivers/atmodem/ussd.c
@@ -53,14 +53,10 @@ static const char *none_prefix[] = { NULL };
static void cusd_parse(GAtResult *result, struct ofono_ussd *ussd)
{
GAtResultIter iter;
- int status;
int dcs;
const char *content;
+ int status = OFONO_USSD_STATUS_NOT_SUPPORTED;
char *converted = NULL;
- gboolean udhi;
- enum sms_charset charset;
- gboolean compressed;
- gboolean iso639;
g_at_result_iter_init(&iter, result);
@@ -76,32 +72,14 @@ static void cusd_parse(GAtResult *result, struct ofono_ussd *ussd)
if (!g_at_result_iter_next_number(&iter, &dcs))
goto out;
- if (!cbs_dcs_decode(dcs, &udhi, NULL, &charset,
- &compressed, NULL, &iso639))
- goto out;
-
- if (udhi || compressed || iso639)
- goto out;
+ converted = ussd_decode(dcs, strlen(content), (unsigned char *)content);
- if (charset == SMS_CHARSET_7BIT)
- converted = convert_gsm_to_utf8((const guint8 *) content,
- strlen(content), NULL, NULL, 0);
-
- else if (charset == SMS_CHARSET_8BIT) {
- /* TODO: Figure out what to do with 8 bit data */
- ofono_error("8-bit coded USSD response received");
- status = 4; /* Not supported */
- } else {
- /* No other encoding is mentioned in TS27007 7.15 */
- ofono_error("Unsupported USSD data coding scheme (%02x)", dcs);
- status = 4; /* Not supported */
- }
+ if (converted)
+ status = OFONO_USSD_STATUS_NOTIFY;
out:
ofono_ussd_notify(ussd, status, converted);
-
- if (converted)
- g_free(converted);
+ g_free(converted);
}
static void cusd_request_cb(gboolean ok, GAtResult *result, gpointer user_data)
--
1.7.0.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 4/5] Refactor ussd parser
2010-06-17 10:35 [PATCH 1/5] stk: Add parser for send ussd commands Yang Gu
2010-06-17 10:35 ` [PATCH 2/5] teststk: Add test for send ussd parser Yang Gu
2010-06-17 10:35 ` [PATCH 3/5] Modify " Yang Gu
@ 2010-06-17 10:35 ` Yang Gu
2010-06-21 14:18 ` Denis Kenzior
2010-06-17 10:35 ` [PATCH 5/5] stk: Add parser for timing advance objects Yang Gu
2010-06-18 19:04 ` [PATCH 1/5] stk: Add parser for send ussd commands Denis Kenzior
4 siblings, 1 reply; 9+ messages in thread
From: Yang Gu @ 2010-06-17 10:35 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 1555 bytes --]
---
drivers/isimodem/ussd.c | 35 ++++++-----------------------------
1 files changed, 6 insertions(+), 29 deletions(-)
diff --git a/drivers/isimodem/ussd.c b/drivers/isimodem/ussd.c
index 8be20b6..7002d09 100644
--- a/drivers/isimodem/ussd.c
+++ b/drivers/isimodem/ussd.c
@@ -73,44 +73,21 @@ static void ussd_parse(struct ofono_ussd *ussd, const void *restrict data,
size_t len)
{
const unsigned char *msg = data;
- unsigned char buf[256];
- unsigned char *unpacked;
- long written;
- int status;
+ int status = OFONO_USSD_STATUS_NOT_SUPPORTED;
char *converted = NULL;
- gboolean udhi;
- enum sms_charset charset;
- gboolean compressed;
- gboolean iso639;
if (!msg || len < 4)
- goto error;
+ goto out;
status = isi_type_to_status(msg[2]);
if (msg[3] == 0 || (size_t)(msg[3] + 4) > len)
- goto error;
-
- if (!cbs_dcs_decode(msg[1], &udhi, NULL, &charset,
- &compressed, NULL, &iso639))
- goto error;
-
- if (udhi || compressed || iso639)
- goto error;
-
- if (charset != SMS_CHARSET_7BIT)
- goto error;
-
- unpacked = unpack_7bit_own_buf(msg + 4, msg[3], 0, TRUE,
- SS_MAX_USSD_LENGTH, &written, 0, buf);
+ goto out;
- converted = convert_gsm_to_utf8((const guint8 *)unpacked, written,
- NULL, NULL, 0);
+ converted = ussd_decode(msg[1], msg[3], msg + 4);
- goto out;
-
-error:
- status = OFONO_USSD_STATUS_NOT_SUPPORTED;
+ if (converted)
+ status = OFONO_USSD_STATUS_NOTIFY;
out:
ofono_ussd_notify(ussd, status, converted);
--
1.7.0.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 5/5] stk: Add parser for timing advance objects
2010-06-17 10:35 [PATCH 1/5] stk: Add parser for send ussd commands Yang Gu
` (2 preceding siblings ...)
2010-06-17 10:35 ` [PATCH 4/5] Refactor " Yang Gu
@ 2010-06-17 10:35 ` Yang Gu
2010-06-18 19:04 ` [PATCH 1/5] stk: Add parser for send ussd commands Denis Kenzior
4 siblings, 0 replies; 9+ messages in thread
From: Yang Gu @ 2010-06-17 10:35 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 3530 bytes --]
---
src/stkutil.c | 22 ++++++++++++++++++++++
src/stkutil.h | 30 ++++++++++++++++++------------
unit/test-stkutil.c | 2 +-
3 files changed, 41 insertions(+), 13 deletions(-)
diff --git a/src/stkutil.c b/src/stkutil.c
index f03b25c..6178059 100644
--- a/src/stkutil.c
+++ b/src/stkutil.c
@@ -1151,6 +1151,26 @@ static gboolean parse_dataobj_language(struct comprehension_tlv_iter *iter,
return TRUE;
}
+/* Defined in 31.111 Section 8.46 */
+static gboolean parse_dataobj_timing_advance(
+ struct comprehension_tlv_iter *iter, void *user)
+{
+ struct stk_timing_advance *ta = user;
+ const unsigned char *data;
+ unsigned int len = comprehension_tlv_iter_get_length(iter);
+
+ if (len != 2)
+ return FALSE;
+
+ data = comprehension_tlv_iter_get_data(iter);
+
+ ta->has_value = TRUE;
+ ta->status = data[0];
+ ta->advance = data[1];
+
+ return TRUE;
+}
+
/* Defined in 102.223 Section 8.47 */
static gboolean parse_dataobj_browser_id(struct comprehension_tlv_iter *iter,
void *user)
@@ -2074,6 +2094,8 @@ static dataobj_handler handler_for_type(enum stk_data_object_type type)
return parse_dataobj_language;
case STK_DATA_OBJECT_TYPE_BROWSER_ID:
return parse_dataobj_browser_id;
+ case STK_DATA_OBJECT_TYPE_TIMING_ADVANCE:
+ return parse_dataobj_timing_advance;
case STK_DATA_OBJECT_TYPE_URL:
return parse_dataobj_url;
case STK_DATA_OBJECT_TYPE_BEARER:
diff --git a/src/stkutil.h b/src/stkutil.h
index 6fb49e0..c2fcea7 100644
--- a/src/stkutil.h
+++ b/src/stkutil.h
@@ -552,6 +552,11 @@ enum stk_rejection_cause_code {
STK_CAUSE_EMM_PROTOCOL_ERROR = 0x6f,
};
+enum stk_me_status {
+ STK_ME_STATUS_IDLE = 0x00,
+ STK_ME_STATUS_NOT_IDLE = 0x01
+};
+
/* For data object that only has a byte array with undetermined length */
struct stk_common_byte_array {
unsigned char *array;
@@ -801,6 +806,18 @@ struct stk_bc_repeat {
unsigned char value;
};
+/* Defined in TS 31.111 Section 8.46 */
+struct stk_timing_advance {
+ ofono_bool_t has_value;
+ enum stk_me_status status;
+ /*
+ * Contains bit periods number according to 3GPP TS
+ * 44.118 Section 9.3.106 / 3GPP TS 44.018 Section
+ * 10.5.2.40.1, not microseconds
+ */
+ unsigned char advance;
+};
+
/*
* According to 102.223 Section 8.52 the length of CTLV is 1 byte. This means
* that the maximum size is 127 according to the rules of CTLVs. This size also
@@ -1381,18 +1398,7 @@ struct stk_response_local_info {
const char *language;
enum stk_battery_state battery_charge;
enum stk_access_technology_type access_technology;
- struct stk_timing_advance {
- enum {
- STK_TIMING_ADVANCE_ME_IDLE = 0x00,
- STK_TIMING_ADVANCE_ME_NOT_IDLE = 0x01,
- } status;
- /*
- * Contains bit periods number according to 3GPP TS
- * 44.118 Section 9.3.106 / 3GPP TS 44.018 Section
- * 10.5.2.40.1, not microseconds
- */
- int advance;
- } tadv;
+ struct stk_timing_advance tadv;
/* Bits[31:24]: manufacturer, bits[23:0]: serial number */
guint32 esn;
const char *imeisv;
diff --git a/unit/test-stkutil.c b/unit/test-stkutil.c
index e498dd6..dd22912 100644
--- a/unit/test-stkutil.c
+++ b/unit/test-stkutil.c
@@ -18699,7 +18699,7 @@ static const struct terminal_response_test
},
{ .provide_local_info = {
{ .tadv = {
- .status = STK_TIMING_ADVANCE_ME_IDLE,
+ .status = STK_ME_STATUS_IDLE,
.advance = 0,
}},
}},
--
1.7.0.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 1/5] stk: Add parser for send ussd commands
2010-06-17 10:35 [PATCH 1/5] stk: Add parser for send ussd commands Yang Gu
` (3 preceding siblings ...)
2010-06-17 10:35 ` [PATCH 5/5] stk: Add parser for timing advance objects Yang Gu
@ 2010-06-18 19:04 ` Denis Kenzior
2010-06-20 13:52 ` Gu, Yang
4 siblings, 1 reply; 9+ messages in thread
From: Denis Kenzior @ 2010-06-18 19:04 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 627 bytes --]
Hi Yang,
> ---
> src/stkutil.c | 61
> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
src/stkutil.h |
> 9 ++++++++
> 2 files changed, 70 insertions(+), 0 deletions(-)
Patches 1, 2 and 5 have been applied. As discussed previously we're skipping
patches 3 and 4 for now. Please note that I broke Patch 2 into two patches (1
for decode_ussd in smsutil.[ch] and one for the unit test), but did not do any
modifications beyond that.
Again, please watch out for this. If your patch touches something in two or
more directories of oFono, please send multiple patches.
Regards,
-Denis
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: [PATCH 1/5] stk: Add parser for send ussd commands
2010-06-18 19:04 ` [PATCH 1/5] stk: Add parser for send ussd commands Denis Kenzior
@ 2010-06-20 13:52 ` Gu, Yang
2010-06-20 16:26 ` Denis Kenzior
0 siblings, 1 reply; 9+ messages in thread
From: Gu, Yang @ 2010-06-20 13:52 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 1307 bytes --]
Hi Denis,
>-----Original Message-----
>From: Denis Kenzior [mailto:denkenz(a)gmail.com]
>Sent: Saturday, June 19, 2010 3:04 AM
>To: ofono(a)ofono.org
>Cc: Gu, Yang
>Subject: Re: [PATCH 1/5] stk: Add parser for send ussd commands
>
>Hi Yang,
>
>> ---
>> src/stkutil.c | 61
>> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>src/stkutil.h |
>> 9 ++++++++
>> 2 files changed, 70 insertions(+), 0 deletions(-)
>
>Patches 1, 2 and 5 have been applied. As discussed previously we're skipping
>patches 3 and 4 for now. Please note that I broke Patch 2 into two patches (1
>for decode_ussd in smsutil.[ch] and one for the unit test), but did not do any
>modifications beyond that.
>
>Again, please watch out for this. If your patch touches something in two or
>more directories of oFono, please send multiple patches.
Thank you for applying the patches. But I have a question on this: Should we keep the code compile-able after each patch? Due to this consideration, I put those changes all in patch 2. This would sometimes be helpful when we want to investigate a regression after a bunch of patches. If this is not a requirement for this project, I will pay more attention on how to split the patches reasonably.
>Regards,
>-Denis
Regards,
-Yang
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/5] stk: Add parser for send ussd commands
2010-06-20 13:52 ` Gu, Yang
@ 2010-06-20 16:26 ` Denis Kenzior
0 siblings, 0 replies; 9+ messages in thread
From: Denis Kenzior @ 2010-06-20 16:26 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 1172 bytes --]
Hi Yang,
> >Again, please watch out for this. If your patch touches something in two
> > or more directories of oFono, please send multiple patches.
>
> Thank you for applying the patches. But I have a question on this: Should
> we keep the code compile-able after each patch? Due to this consideration,
> I put those changes all in patch 2. This would sometimes be helpful when
> we want to investigate a regression after a bunch of patches. If this is
> not a requirement for this project, I will pay more attention on how to
> split the patches reasonably.
Keeping the code compilable is always preferable. For instance, if you're
adding a function to smsutil to use elsewhere, it is always preferable to have
a commit with this function and then commit(s) using this function.
However, there are cases when you're moving code around and breaking compile
in transient commits is unavoidable. In that case I still prefer clean,
logical patches. I will apply them all or not at all, so as long as the code
compiles & works cleanly afterward, it is fine.
Regards,
-Denis
>
> >Regards,
> >-Denis
>
> Regards,
> -Yang
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 4/5] Refactor ussd parser
2010-06-17 10:35 ` [PATCH 4/5] Refactor " Yang Gu
@ 2010-06-21 14:18 ` Denis Kenzior
0 siblings, 0 replies; 9+ messages in thread
From: Denis Kenzior @ 2010-06-21 14:18 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 199 bytes --]
Hi Yang,
> ---
> drivers/isimodem/ussd.c | 35 ++++++-----------------------------
> 1 files changed, 6 insertions(+), 29 deletions(-)
Patch has been applied, thanks.
Regards,
-Denis
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2010-06-21 14:18 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-17 10:35 [PATCH 1/5] stk: Add parser for send ussd commands Yang Gu
2010-06-17 10:35 ` [PATCH 2/5] teststk: Add test for send ussd parser Yang Gu
2010-06-17 10:35 ` [PATCH 3/5] Modify " Yang Gu
2010-06-17 10:35 ` [PATCH 4/5] Refactor " Yang Gu
2010-06-21 14:18 ` Denis Kenzior
2010-06-17 10:35 ` [PATCH 5/5] stk: Add parser for timing advance objects Yang Gu
2010-06-18 19:04 ` [PATCH 1/5] stk: Add parser for send ussd commands Denis Kenzior
2010-06-20 13:52 ` Gu, Yang
2010-06-20 16:26 ` Denis Kenzior
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.