From 214cd403cb23aeaf7fc87c9b2cab01d99f5611a8 Mon Sep 17 00:00:00 2001 From: Wootak Jung Date: Thu, 3 Sep 2015 11:27:40 +0900 Subject: [PATCH] Sync from SPIN branch Change-Id: I25e703dadea3dab043dfe0d5b6eadf5ad684f7c4 --- packaging/tel-plugin-atmodem.spec | 2 +- src/s_call.c | 2 +- src/s_sim.c | 20 ++++++-------------- src/s_sms.c | 26 +++++++++----------------- src/s_ss.c | 5 ----- 5 files changed, 17 insertions(+), 38 deletions(-) diff --git a/packaging/tel-plugin-atmodem.spec b/packaging/tel-plugin-atmodem.spec index 700df53..08a8ce6 100644 --- a/packaging/tel-plugin-atmodem.spec +++ b/packaging/tel-plugin-atmodem.spec @@ -1,6 +1,6 @@ %define major 0 %define minor 1 -%define patchlevel 66 +%define patchlevel 67 Name: tel-plugin-atmodem Version: %{major}.%{minor}.%{patchlevel} diff --git a/src/s_call.c b/src/s_call.c index dc7e762..45843d4 100644 --- a/src/s_call.c +++ b/src/s_call.c @@ -752,7 +752,7 @@ static gboolean on_notification_call_cssu_info(CoreObject *co, break; case 9: - command = TNOTI_CALL_INFO_DEFLECTED; + command = TNOTI_CALL_INFO_DEFLECTED_CALL; break; default: diff --git a/src/s_sim.c b/src/s_sim.c index f147288..e72e83a 100644 --- a/src/s_sim.c +++ b/src/s_sim.c @@ -67,14 +67,6 @@ } typedef enum { - SIM_FILE_TYPE_DEDICATED = 0x00, /**< Dedicated */ - SIM_FILE_TYPE_TRANSPARENT = 0x01, /**< Transparent -binary type*/ - SIM_FILE_TYPE_LINEAR_FIXED = 0x02, /**< Linear fixed - record type*/ - SIM_FILE_TYPE_CYCLIC = 0x04, /**< Cyclic - record type*/ - SIM_FILE_TYPE_INVALID_TYPE = 0xFF /**< Invalid type */ -} sim_file_type_t; - -typedef enum { SIM_CURR_SEC_OP_PIN1_VERIFY, SIM_CURR_SEC_OP_PIN2_VERIFY, SIM_CURR_SEC_OP_PUK1_VERIFY, @@ -160,7 +152,7 @@ typedef struct { guint rec_count; /**< Number of records in file */ guint data_size; /**< File size */ guint current_index; /**< Current index to read */ - sim_file_type_t file_type; /**< File type and structure */ + enum tcore_sim_file_type_e file_type; /**< File type and structure */ struct tel_sim_mbi_list mbi_list; /**< Mailbox List */ struct tel_sim_mb_number mb_list[SIM_MSP_CNT_MAX * 5]; /**< Mailbox number */ enum tel_sim_file_id file_id; /**< Current file id */ @@ -1743,7 +1735,7 @@ static void __on_response_sim_get_response(TcorePending *p, /* increment to next byte */ case 0x1: dbg("Getting FileType: [Transparent file type]"); - file_type = SIM_FILE_TYPE_TRANSPARENT; + file_type = SIM_FTYPE_TRANSPARENT; /* increment to next byte */ ptr_data++; @@ -1769,7 +1761,7 @@ static void __on_response_sim_get_response(TcorePending *p, num_of_records = *ptr_data++; /* Data lossy conversation from enum (int) to unsigned char */ - file_type = SIM_FILE_TYPE_LINEAR_FIXED; + file_type = SIM_FTYPE_LINEAR_FIXED; break; case 0x6: @@ -1787,7 +1779,7 @@ static void __on_response_sim_get_response(TcorePending *p, SWAP_BYTES_16(record_len); ptr_data = ptr_data + 2; num_of_records = *ptr_data++; - file_type = SIM_FILE_TYPE_CYCLIC; + file_type = SIM_FTYPE_CYCLIC; break; default: @@ -2003,14 +1995,14 @@ static void __on_response_sim_get_response(TcorePending *p, /* increament to next byte as this byte is RFU */ ptr_data++; file_type = - (file_type_tag == 0x00) ? SIM_FILE_TYPE_TRANSPARENT : SIM_FILE_TYPE_LINEAR_FIXED; + (file_type_tag == 0x00) ? SIM_FTYPE_TRANSPARENT : SIM_FTYPE_LINEAR_FIXED; } else { /* increment to next byte */ ptr_data++; /* For a cyclic EF all bits except bit 7 are RFU; b7=1 indicates that */ /* the INCREASE command is allowed on the selected cyclic file. */ - file_type = SIM_FILE_TYPE_CYCLIC; + file_type = SIM_FTYPE_CYCLIC; } /* bytes 9 to 11 give SIM file access conditions */ diff --git a/src/s_sms.c b/src/s_sms.c index 2ac595c..10a4841 100644 --- a/src/s_sms.c +++ b/src/s_sms.c @@ -1101,7 +1101,7 @@ static void on_response_sms_get_param_count(TcorePending *pending, int data_len, dbg("Getting FileType: [Transparent file type]"); /* increment to next byte */ ptr_data++; - file_type = 0x01; /* SIM_FTYPE_TRANSPARENT */ + file_type = SIM_FTYPE_TRANSPARENT; /* data coding byte - value 21 */ ptr_data++; @@ -1124,7 +1124,7 @@ static void on_response_sms_get_param_count(TcorePending *pending, int data_len, num_of_records = *ptr_data++; /* Data lossy conversation from enum (int) to unsigned char */ - file_type = 0x02; /* SIM_FTYPE_LINEAR_FIXED */ + file_type = SIM_FTYPE_LINEAR_FIXED; break; case 0x6: @@ -1142,7 +1142,7 @@ static void on_response_sms_get_param_count(TcorePending *pending, int data_len, record_len = SMS_SWAPBYTES16(record_len); ptr_data = ptr_data + 2; num_of_records = *ptr_data++; - file_type = 0x04; /* SIM_FTYPE_CYCLIC */ + file_type = SIM_FTYPE_CYCLIC; break; default: @@ -1371,13 +1371,13 @@ static void on_response_sms_get_param_count(TcorePending *pending, int data_len, /* increament to next byte as this byte is RFU */ ptr_data++; file_type = - (file_type_tag == 0x00) ? 0x01 : 0x02; /* SIM_FTYPE_TRANSPARENT:SIM_FTYPE_LINEAR_FIXED; */ + (file_type_tag == 0x00) ? SIM_FTYPE_TRANSPARENT : SIM_FTYPE_LINEAR_FIXED; } else { /* increment to next byte */ ptr_data++; /* For a cyclic EF all bits except bit 7 are RFU; b7=1 indicates that */ /* the INCREASE command is allowed on the selected cyclic file. */ - file_type = 0x04; /* SIM_FTYPE_CYCLIC; */ + file_type = SIM_FTYPE_CYCLIC; } /* bytes 9 to 11 give SIM file access conditions */ @@ -1856,7 +1856,6 @@ static struct tcore_sms_operations sms_ops = { gboolean s_sms_init(TcorePlugin *p, TcoreHal *hal) { CoreObject *co; - struct property_sms_info *data = NULL; int *smsp_record_len = NULL; co = tcore_sms_new(p, "umts_sms", &sms_ops, hal); @@ -1865,15 +1864,6 @@ gboolean s_sms_init(TcorePlugin *p, TcoreHal *hal) return FALSE; } - data = g_try_malloc0(sizeof(struct property_sms_info)); - if (NULL == data) { - err("Unable to initialize. Exiting"); - s_sms_exit(p); - - dbg("Exit"); - return FALSE; - } - /* Add Callbacks */ tcore_object_add_callback(co, "\e+CMT:", @@ -1882,8 +1872,6 @@ gboolean s_sms_init(TcorePlugin *p, TcoreHal *hal) "+SCDEV", on_notification_sms_device_ready, NULL); - tcore_plugin_link_property(p, "SMS", data); - /* Storing smsp record length */ smsp_record_len = g_try_malloc0(sizeof(int)); tcore_plugin_link_property(p, "SMSPRECORDLEN", smsp_record_len); @@ -1896,6 +1884,7 @@ gboolean s_sms_init(TcorePlugin *p, TcoreHal *hal) void s_sms_exit(TcorePlugin *p) { CoreObject *co; + int *smsp_record_len = NULL; co = tcore_plugin_ref_core_object(p, CORE_OBJECT_TYPE_SMS); if (!co) { @@ -1903,6 +1892,9 @@ void s_sms_exit(TcorePlugin *p) return; } + smsp_record_len = tcore_plugin_ref_property(p, "SMSPRECORDLEN"); + g_free(smsp_record_len); + tcore_sms_free(co); } diff --git a/src/s_ss.c b/src/s_ss.c index a6bdffb..9551e41 100644 --- a/src/s_ss.c +++ b/src/s_ss.c @@ -1541,13 +1541,8 @@ gboolean s_ss_init(TcorePlugin *p, TcoreHal *h) void s_ss_exit(TcorePlugin *p) { CoreObject *o; - struct property_network_info *data; o = tcore_plugin_ref_core_object(p, CORE_OBJECT_TYPE_SS); - data = tcore_plugin_ref_property(p, "SS"); - if (data) - g_free(data); - tcore_ss_free(o); } -- 2.7.4