From 0d8264ce5cee1844f73b646e81dac4e71e64a363 Mon Sep 17 00:00:00 2001 From: Wootak Jung Date: Wed, 28 Jun 2023 16:21:47 +0900 Subject: [PATCH] Fix build errors Change-Id: I341638db29aa4d3422ffa9be735d3f8f0c18e287 Signed-off-by: Wootak Jung --- include/s_common.h | 2 +- src/s_call.c | 12 ++++++------ src/s_network.c | 5 +++-- src/s_sim.c | 7 +++---- src/s_sms.c | 2 -- 5 files changed, 13 insertions(+), 15 deletions(-) diff --git a/include/s_common.h b/include/s_common.h index 85835d7..70ba12c 100644 --- a/include/s_common.h +++ b/include/s_common.h @@ -121,6 +121,6 @@ char* util_hexStringToBytes(char * s); gboolean util_byte_to_hex(const char *byte_pdu, char *hex_pdu, int num_bytes); void on_send_at_request(TcorePending *p, - TReturn send_status, void *user_data); + gboolean send_status, void *user_data); #endif diff --git a/src/s_call.c b/src/s_call.c index 45843d4..905a6d6 100644 --- a/src/s_call.c +++ b/src/s_call.c @@ -128,7 +128,7 @@ static void _call_branch_by_status(CoreObject *co, case TCORE_CALL_STATUS_ACTIVE: { struct tnoti_call_status_active data = {0, }; - data.type = call_type; + data.type = CALL_TYPE_VOICE; data.handle = call_handle; /* Send notification */ @@ -141,7 +141,7 @@ static void _call_branch_by_status(CoreObject *co, case TCORE_CALL_STATUS_HELD: { struct tnoti_call_status_held data = {0, }; - data.type = call_type; + data.type = CALL_TYPE_VOICE; data.handle = call_handle; /* Send notification */ @@ -154,7 +154,7 @@ static void _call_branch_by_status(CoreObject *co, case TCORE_CALL_STATUS_DIALING: { struct tnoti_call_status_dialing data = {0, }; - data.type = call_type; + data.type = CALL_TYPE_VOICE; data.handle = call_handle; /* Send notification */ @@ -167,7 +167,7 @@ static void _call_branch_by_status(CoreObject *co, case TCORE_CALL_STATUS_ALERT: { struct tnoti_call_status_alert data = {0, }; - data.type = call_type; + data.type = CALL_TYPE_VOICE; data.handle = call_handle; /* Send notification */ @@ -181,7 +181,7 @@ static void _call_branch_by_status(CoreObject *co, case TCORE_CALL_STATUS_WAITING: { struct tnoti_call_status_incoming data = {0, }; - data.type = call_type; + data.type = CALL_TYPE_VOICE; data.handle = call_handle; tcore_call_object_get_number(call_obj, data.cli.number); data.cli.mode = tcore_call_object_get_cli_mode(call_obj); @@ -203,7 +203,7 @@ static void _call_branch_by_status(CoreObject *co, idle.handle = call_handle; /* TODO - get proper call end cause. */ idle.cause = CALL_END_CAUSE_NONE; - idle.type = TCORE_CALL_TYPE_VOICE; + idle.type = CALL_TYPE_VOICE; /* Send notification */ tcore_server_send_notification(tcore_plugin_ref_server(p), co, diff --git a/src/s_network.c b/src/s_network.c index a99aa82..e0aef87 100644 --- a/src/s_network.c +++ b/src/s_network.c @@ -100,7 +100,7 @@ static unsigned int lookup_tbl_access_technology[] = { [AT_COPS_ACT_E_UTRAN] = NETWORK_ACT_GSM_UTRAN, }; -static gboolean get_serving_network(CoreObject *o, UserRequest *ur); +static TReturn get_serving_network(CoreObject *o, UserRequest *ur); static void _insert_mcc_mnc_oper_list(TcorePlugin *p, CoreObject *co_network) { @@ -912,9 +912,10 @@ static void on_response_network_set_plmn_selection_mode(TcorePending *p, nw_resp.result = TCORE_RETURN_SUCCESS; } else { err("RESPONSE NOK"); - if (at_resp->lines) + if (at_resp->lines) { err("CME Error[%s]", (char *)at_resp->lines->data); nw_resp.result = TCORE_RETURN_FAILURE; + } } } else { err("Response: [NOK]"); diff --git a/src/s_sim.c b/src/s_sim.c index 8f061b8..5de04ac 100644 --- a/src/s_sim.c +++ b/src/s_sim.c @@ -161,7 +161,7 @@ typedef struct { 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 */ - TReturn file_result; /**< File access result */ + enum tel_sim_access_result file_result; /**< File access result */ struct tresp_sim_read files; /**< File read data */ enum tcore_request_command req_command; /**< Request command Id */ struct tel_sim_imsi imsi; /**< Stored locally as of now, @@ -184,7 +184,6 @@ static TReturn s_sim_get_facility(CoreObject *co_sim, UserRequest *ur); static TReturn s_sim_read_file(CoreObject *co_sim, UserRequest *ur); /* Utility Function Declaration */ -static TReturn __sim_decode_status_word(unsigned short status_word1, unsigned short status_word2); static void __sim_update_sim_status(CoreObject *co_sim, enum tel_sim_status sim_status); static void __sim_get_sim_type(CoreObject *co_sim); static const char *__sim_get_fac_from_lock_type(enum tel_sim_facility_type lock_type); @@ -371,10 +370,10 @@ static enum tcore_response_command __find_resp_command(UserRequest *ur) } /* Utility Functions */ -static TReturn __sim_decode_status_word(unsigned short status_word1, +static enum tel_sim_access_result __sim_decode_status_word(unsigned short status_word1, unsigned short status_word2) { - TReturn rst = SIM_ACCESS_FAILED; + enum tel_sim_access_result rst = SIM_ACCESS_FAILED; if (status_word1 == 0x93 && status_word2 == 0x00) { rst = SIM_ACCESS_FAILED; diff --git a/src/s_sms.c b/src/s_sms.c index daf39ae..b5cccdf 100644 --- a/src/s_sms.c +++ b/src/s_sms.c @@ -76,8 +76,6 @@ static gboolean __util_hexstring_to_bytes(char *hex_str, char **bytes, guint *bytes_len); static long __util_encode_hex(const guchar *src, long num_bytes, char *buf); -static guint __util_encode_pdu(const guchar sca[SMS_SMSP_ADDRESS_LEN], - const guchar *tpdu, guint tpdu_len, char *pdu); static gchar __util_hexchar_to_int(gchar c) { -- 2.7.4