UserRequest *user_req = NULL;
GSList *tokens = NULL;
+ const char *sca_tok_addr;
char *gslist_line = NULL, *sca_addr = NULL, *sca_toa = NULL;
dbg("Entry");
gslist_line = (char *)at_response->lines->data;
tokens = tcore_at_tok_new(gslist_line);
- sca_addr = g_slist_nth_data(tokens, 0);
+ sca_tok_addr = g_slist_nth_data(tokens, 0);
sca_toa = g_slist_nth_data(tokens, 1);
+ sca_addr = tcore_at_tok_extract(sca_tok_addr);
if ((NULL != sca_addr)
&& (NULL != sca_toa)) {
dbg("sca_addr: [%s]. sca_toa: [%s]", sca_addr, sca_toa);
tcore_user_request_send_response(user_req, TRESP_SMS_GET_SCA, sizeof(respGetSca), &respGetSca);
- if(tokens)
- tcore_at_tok_free(tokens);
+ tcore_at_tok_free(tokens);
+ g_free(sca_addr);
dbg("Exit");
return;
char *encoded_data = NULL;
unsigned char *temp_data = NULL;
int SMSPRecordLen = 0;
+ int *smsp_record_len;
TcoreHal *hal = NULL;
TcoreATRequest *atreq = NULL;
}
//EFsmsp file size is 28 +Y bytes (Y is alpha id size)
- SMSPRecordLen = 28 + setSmsParams->params.alphaIdLen;
+ smsp_record_len = tcore_plugin_ref_property(tcore_object_ref_plugin(obj), "SMSPRECORDLEN");
+ SMSPRecordLen = *smsp_record_len;
+ if (SMSPRecordLen < nDefaultSMSPWithoutAlphaId)
+ return FALSE;
+
temp_data = calloc(SMSPRecordLen,1);
encoded_data = calloc(SMSPRecordLen*2 + 1,1);
tcore_sms_override_ops(co_sms, &sms_ops);
/* Registering for SMS notifications */
- tcore_object_override_callback(co_sms, "\e+CMTI", on_event_class2_sms_incom_msg, NULL);
- tcore_object_override_callback(co_sms, "\e+CMT", on_event_sms_incom_msg, NULL);
+ tcore_object_override_callback(co_sms, "+CMTI:", on_event_class2_sms_incom_msg, NULL);
+ tcore_object_override_callback(co_sms, "\e+CMT:", on_event_sms_incom_msg, NULL);
tcore_object_override_callback(co_sms, "\e+CDS", on_event_sms_incom_msg, NULL);
tcore_object_override_callback(co_sms, "+XSMSMMSTAT", on_event_sms_memory_status, NULL);
tcore_object_override_callback(co_sms, "+CMS", on_event_sms_memory_status, NULL);
- tcore_object_override_callback(co_sms, "\e+CBMI", on_event_sms_cb_incom_msg, NULL);
- tcore_object_override_callback(co_sms, "\e+CBM", on_event_sms_cb_incom_msg, NULL);
+ tcore_object_override_callback(co_sms, "+CBMI:", on_event_sms_cb_incom_msg, NULL);
+ tcore_object_override_callback(co_sms, "\e+CBM:", on_event_sms_cb_incom_msg, NULL);
/* Storing SMSP record length */
smsp_record_len = g_new0(int, 1);