Merge pull request #43 from mer-hybris/jb63132

Fix VoLTE toggling. Fix some memory related and other issues
This commit is contained in:
Matti Lehtimäki
2025-02-13 15:35:57 +02:00
committed by GitHub
4 changed files with 22 additions and 13 deletions

View File

@@ -143,8 +143,8 @@ binder_base_emit_queued_signals(
/* Signal handlers may release references to this object */
g_object_ref(self);
/* Emit the signals */
for (p = 0; self->queued_signals && p < BINDER_BASE_MAX_PROPERTIES; p++) {
/* Emit the signals, ignore the ANY property */
for (p = 1; self->queued_signals && p < BINDER_BASE_MAX_PROPERTIES; p++) {
if (self->queued_signals & BINDER_BASE_PROPERTY_BIT(p)) {
self->queued_signals &= ~BINDER_BASE_PROPERTY_BIT(p);
g_signal_emit(self, binder_base_signals[SIGNAL_PROPERTY_CHANGED],

View File

@@ -21,6 +21,7 @@
#include "binder_util.h"
#include "binder_ext_ims.h"
#include "binder_ext_slot.h"
#include <ofono/ims.h>
@@ -211,6 +212,8 @@ binder_ims_probe(
self->handle = handle;
self->ims = binder_ims_reg_ref(modem->ims);
self->ext = binder_ext_ims_ref(binder_ext_slot_get_interface(modem->ext,
BINDER_EXT_TYPE_IMS));
self->start_id = g_idle_add(binder_ims_start, self);
ofono_ims_set_data(handle, self);
return 0;

View File

@@ -468,18 +468,19 @@ binder_sms_submit_cb(
(RADIO_MESSAGING_RESP)resp == RADIO_MESSAGING_RESP_SEND_IMS_SMS) {
if (error == RADIO_ERROR_NONE) {
GBinderReader reader;
gint32 message_ref;
char* ack_pdu = NULL;
gint32 error_code;
gbinder_reader_copy(&reader, args);
if (binder_read_parcelable_size(&reader)) {
gint32 message_ref;
char* ack_pdu = NULL;
gint32 error_code;
gbinder_reader_read_int32(&reader, &message_ref);
ack_pdu = gbinder_reader_read_string16(&reader);
gbinder_reader_read_int32(&reader, &error_code);
DBG("%ssms msg ref: %d, ack: %s err: %d", ims ? "ims " : "",
message_ref, ack_pdu, error_code);
message_ref, ack_pdu, error_code);
g_free(ack_pdu);
/*
@@ -495,7 +496,6 @@ binder_sms_submit_cb(
return;
}
}
g_free(ack_pdu);
} else {
ofono_error("%ssms send error %s", ims ? "ims " : "",
binder_radio_error_string(error));

View File

@@ -596,8 +596,11 @@ binder_voicecall_lastcause_cb(
if (resp == code) {
GBinderReader reader;
const RadioLastCallFailCauseInfo* info;
gint32 cause_code;
/*
* Cause code 0 is invalid and can be used to check if code was
* obtained.
*/
gint32 cause_code = 0;
/*
* getLastCallFailCauseResponse(RadioResponseInfo,
@@ -605,14 +608,17 @@ binder_voicecall_lastcause_cb(
*/
gbinder_reader_copy(&reader, args);
if (self->interface_aidl == RADIO_AIDL_INTERFACE_NONE) {
info = gbinder_reader_read_hidl_struct(&reader,
RadioLastCallFailCauseInfo);
cause_code = info->causeCode;
const RadioLastCallFailCauseInfo* info =
gbinder_reader_read_hidl_struct(&reader,
RadioLastCallFailCauseInfo);
if (info) {
cause_code = info->causeCode;
}
} else {
gbinder_reader_read_int32(&reader, &cause_code);
gbinder_reader_skip_string16(&reader);
}
if (info) {
if (cause_code) {
enum ofono_disconnect_reason reason =
binder_voicecall_map_cause(self, cid, cause_code);