debug logs

This commit is contained in:
2025-10-18 14:25:07 +08:00
parent aeeb20499f
commit 100d9873c8
2 changed files with 68 additions and 0 deletions

View File

@@ -321,6 +321,7 @@ connman_tech_set_properties(
ConnManTech* tech,
DBusMessageIter* it)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusMessageIter dict;
int handled = 0;
@@ -345,6 +346,7 @@ connman_tech_property_changed(
DBusMessage* msg,
void* user_data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
const char* path = dbus_message_get_path(msg);
ConnManObject* self = THIS(user_data);
ConnManTech* tech = g_hash_table_lookup(self->techs, path);
@@ -368,6 +370,7 @@ connman_set_techs(
ConnManObject* self,
DBusMessageIter* it)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusMessageIter list;
dbus_message_iter_recurse(it, &list);
@@ -398,6 +401,7 @@ connman_techs_reply(
DBusPendingCall* call,
void* user_data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
ConnManObject* self = THIS(user_data);
DBusMessage* reply = dbus_pending_call_steal_reply(call);
DBusError error;
@@ -424,6 +428,7 @@ void
connman_get_techs(
ConnManObject* self)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
DBusMessage* msg = dbus_message_new_method_call(CONNMAN_SERVICE,
CONNMAN_PATH, CONNMAN_MANAGER_INTERFACE, CONNMAN_GET_TECHNOLOGIES);
@@ -444,6 +449,7 @@ connman_appeared(
DBusConnection* conn,
void* user_data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
ConnManObject* self = THIS(user_data);
BinderConnman* connman = &self->pub;
@@ -463,6 +469,7 @@ connman_vanished(
DBusConnection* conn,
void* user_data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
ConnManObject* self = THIS(user_data);
BinderConnman* connman = &self->pub;
@@ -493,6 +500,7 @@ connman_init(
ConnManObject* self,
DBusConnection* connection)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
self->connection = dbus_connection_ref(connection);
self->service_watch = g_dbus_add_service_watch(self->connection,
CONNMAN_SERVICE, connman_appeared, connman_vanished, self, NULL);
@@ -508,6 +516,7 @@ connman_init(
BinderConnman*
binder_connman_new()
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
static ConnManObject* instance = NULL;
if (instance) {
@@ -539,6 +548,7 @@ BinderConnman*
binder_connman_ref(
BinderConnman* connman)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
ConnManObject* self = connman_object_cast(connman);
if (G_LIKELY(self)) {
@@ -551,6 +561,7 @@ void
binder_connman_unref(
BinderConnman* connman)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
ConnManObject* self = connman_object_cast(connman);
if (G_LIKELY(self)) {
@@ -565,6 +576,7 @@ binder_connman_add_property_changed_handler(
BinderConnmanPropertyFunc callback,
void* user_data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
ConnManObject* self = connman_object_cast(connman);
return G_LIKELY(self) ? binder_base_add_property_handler(&self->base,
@@ -576,6 +588,7 @@ binder_connman_remove_handler(
BinderConnman* connman,
gulong id)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (G_LIKELY(id)) {
ConnManObject* self = connman_object_cast(connman);
@@ -591,6 +604,7 @@ binder_connman_remove_handlers(
gulong* ids,
int n)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
gutil_disconnect_handlers(connman_object_cast(connman), ids, n);
}
@@ -603,6 +617,7 @@ void
connman_object_init(
ConnManObject* self)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
self->techs = g_hash_table_new_full(g_str_hash, g_str_equal,
g_free, g_free);
}
@@ -612,6 +627,7 @@ void
connman_object_finalize(
GObject *object)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
ConnManObject* self = THIS(object);
connman_cancel_call(self);
@@ -624,6 +640,7 @@ connman_object_finalize(
static void connman_object_class_init(ConnManObjectClass *klass)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
G_OBJECT_CLASS(klass)->finalize = connman_object_finalize;
BINDER_BASE_CLASS(klass)->public_offset =
G_STRUCT_OFFSET(ConnManObject, pub);

View File

@@ -313,6 +313,7 @@ guint8
binder_data_modem_id(
BinderDataObject* data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (data) {
guint count = 0;
BinderDataManager* dm = data->dm;
@@ -338,6 +339,7 @@ binder_data_deactivate_data_call_request_new(
GDestroyNotify destroy,
void* user_data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
RadioClient* client = group->client;
const RADIO_INTERFACE iface = radio_client_interface(client);
const RADIO_AIDL_INTERFACE iface_aidl = radio_client_aidl_interface(client);
@@ -392,6 +394,7 @@ binder_data_set_data_allowed_request_new(
GDestroyNotify destroy,
void* user_data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
GBinderWriter args;
guint32 code =
radio_client_aidl_interface(group->client) == RADIO_DATA_INTERFACE ?
@@ -413,6 +416,7 @@ static
BinderDataCall*
binder_data_call_new()
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return g_new0(struct binder_data_call, 1);
}
@@ -421,6 +425,7 @@ BinderDataCall*
binder_data_call_dup(
const BinderDataCall* call)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (call) {
BinderDataCall* dc = binder_data_call_new();
@@ -445,6 +450,7 @@ void
binder_data_call_destroy(
BinderDataCall* call)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
g_free(call->ifname);
g_strfreev(call->dnses);
g_strfreev(call->gateways);
@@ -457,6 +463,7 @@ void
binder_data_call_free(
BinderDataCall* call)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (call) {
binder_data_call_destroy(call);
g_free(call);
@@ -468,6 +475,7 @@ void
binder_data_call_list_free(
GSList* calls)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
g_slist_free_full(calls, (GDestroyNotify) binder_data_call_free);
}
@@ -477,6 +485,7 @@ binder_data_call_compare(
gconstpointer a,
gconstpointer b)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
const BinderDataCall* ca = a;
const BinderDataCall* cb = b;
@@ -488,6 +497,7 @@ BinderDataCall*
binder_data_call_new_1_0(
const RadioDataCall* dc)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
BinderDataCall* call = binder_data_call_new();
call->cid = dc->cid;
@@ -516,6 +526,7 @@ binder_data_call_list_1_0(
const RadioDataCall* calls,
gsize n)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (n) {
gsize i;
GSList* l = NULL;
@@ -537,6 +548,7 @@ BinderDataCall*
binder_data_call_new_1_4(
const RadioDataCall_1_4* dc)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
BinderDataCall* call = binder_data_call_new();
call->cid = dc->cid;
@@ -567,6 +579,7 @@ BinderDataCall*
binder_data_call_new_1_5(
const RadioDataCall_1_5* dc)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
BinderDataCall* call = binder_data_call_new();
call->cid = dc->cid;
@@ -597,6 +610,7 @@ BinderDataCall*
binder_data_call_new_aidl(
GBinderReader* reader)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
BinderDataCall* call = binder_data_call_new();
gsize data_read;
@@ -684,6 +698,7 @@ binder_data_call_list_1_4(
const RadioDataCall_1_4* calls,
gsize n)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (n) {
gsize i;
GSList* l = NULL;
@@ -706,6 +721,7 @@ binder_data_call_list_1_5(
const RadioDataCall_1_5* calls,
gsize n)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (n) {
gsize i;
GSList* l = NULL;
@@ -727,6 +743,7 @@ GSList*
binder_data_call_list_aidl(
GBinderReader* reader)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
gint32 n;
gbinder_reader_read_int32(reader, &n);
if (n > 0) {
@@ -751,6 +768,7 @@ binder_data_call_equal(
const BinderDataCall* c1,
const BinderDataCall* c2)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (c1 == c2) {
return TRUE;
} else if (c1 && c2) {
@@ -776,6 +794,7 @@ binder_data_call_list_equal(
GSList* l1,
GSList* l2)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
while (l1 && l2) {
if (!binder_data_call_equal(l1->data, l2->data)) {
return FALSE;
@@ -792,6 +811,7 @@ binder_data_call_list_contains(
GSList* l,
const BinderDataCall* call)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
while (l) {
if (binder_data_call_equal(l->data, call)) {
return TRUE;
@@ -807,6 +827,7 @@ binder_data_call_find(
GSList* l,
int cid)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
while (l) {
BinderDataCall* call = l->data;
@@ -824,6 +845,7 @@ binder_data_set_calls(
BinderDataObject* self,
GSList* list)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
BinderBase* base = &self->base;
BinderData* data = &self->pub;
GHashTableIter it;
@@ -874,6 +896,7 @@ gboolean
binder_data_is_allowed(
BinderDataObject* data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return G_LIKELY(data) &&
(data->restricted_state & RADIO_RESTRICTED_STATE_PS_ALL) == 0 &&
(data->flags & (BINDER_DATA_FLAG_ALLOWED | BINDER_DATA_FLAG_ON)) ==
@@ -886,6 +909,7 @@ binder_data_check_allowed(
BinderDataObject* data,
gboolean was_allowed)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (binder_data_is_allowed(data) != was_allowed) {
binder_base_queue_property_change(&data->base,
BINDER_DATA_PROPERTY_ALLOWED);
@@ -900,6 +924,7 @@ binder_data_restricted_state_changed(
const GBinderReader* args,
gpointer user_data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
BinderDataObject* data = THIS(user_data);
GBinderReader reader;
gint32 state;
@@ -927,6 +952,7 @@ binder_data_call_list_changed(
BinderDataObject* data,
GSList* list)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (data->query_req) {
/* We have received change event before query has completed */
DBG_(data, "cancelling query");
@@ -945,6 +971,7 @@ binder_data_call_list_changed_1_0(
const GBinderReader* args,
gpointer user_data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
BinderDataObject* data = THIS(user_data);
GBinderReader reader;
const RadioDataCall* calls;
@@ -965,6 +992,7 @@ binder_data_call_list_changed_1_4(
const GBinderReader* args,
gpointer user_data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
BinderDataObject* data = THIS(user_data);
GBinderReader reader;
const RadioDataCall_1_4* calls;
@@ -985,6 +1013,7 @@ binder_data_call_list_changed_1_5(
const GBinderReader* args,
gpointer user_data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
BinderDataObject* data = THIS(user_data);
GBinderReader reader;
const RadioDataCall_1_5* calls;
@@ -1005,6 +1034,7 @@ binder_data_call_list_changed_aidl(
const GBinderReader* args,
gpointer user_data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
BinderDataObject* data = THIS(user_data);
GBinderReader reader;
@@ -1024,6 +1054,7 @@ void binder_data_query_data_calls_cb(
const GBinderReader* args,
gpointer user_data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
BinderDataObject* data = THIS(user_data);
GASSERT(data->query_req == req);
@@ -1102,6 +1133,7 @@ void
binder_data_request_free(
BinderDataRequest* dr)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (dr->free) {
dr->free(dr);
} else {
@@ -1114,6 +1146,7 @@ void
binder_data_request_detach(
BinderDataRequest* dr)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (dr) {
dr->cb.ptr = NULL;
dr->arg = NULL;
@@ -1126,6 +1159,7 @@ binder_data_request_call(
BinderDataRequest* dr,
RadioRequest* req)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
GASSERT(!dr->radio_req);
radio_request_drop(dr->radio_req);
if (radio_request_submit(req)) {
@@ -1144,6 +1178,7 @@ void
binder_data_request_cancel_io(
BinderDataRequest* dr)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (dr->radio_req) {
radio_request_drop(dr->radio_req);
dr->radio_req = NULL;
@@ -1155,6 +1190,7 @@ void
binder_data_request_submit_next(
BinderDataObject* data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (!data->pending_req) {
int submission_failure = 0;
@@ -1192,6 +1228,7 @@ gboolean
binder_data_request_do_cancel(
BinderDataRequest* dr)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (dr && !(dr->flags & DATA_REQUEST_FLAG_COMPLETED)) {
BinderDataObject* data = dr->data;
@@ -1232,6 +1269,7 @@ void
binder_data_request_cancel(
BinderDataRequest* dr)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if (dr) {
BinderDataObject* data = dr->data;
@@ -1246,6 +1284,7 @@ void
binder_data_request_completed(
BinderDataRequest* dr)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
GASSERT(!(dr->flags & DATA_REQUEST_FLAG_COMPLETED));
dr->flags |= DATA_REQUEST_FLAG_COMPLETED;
}
@@ -1255,6 +1294,7 @@ void
binder_data_request_finish(
BinderDataRequest* dr)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
BinderDataObject* data = dr->data;
GASSERT(dr == data->pending_req);
@@ -1270,6 +1310,11 @@ void
binder_data_request_queue(
BinderDataRequest* dr)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
if(dr == NULL){
DBG("dr == NULL,func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
return;
}
BinderDataObject* data = dr->data;
dr->next = NULL;
@@ -1298,6 +1343,7 @@ void
binder_data_call_setup_cancel(
BinderDataRequest* dr)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
BinderDataRequestSetup* setup = G_CAST(dr, BinderDataRequestSetup, req);
binder_data_request_cancel_io(dr);
@@ -1318,6 +1364,7 @@ gboolean
binder_data_call_setup_retry(
gpointer user_data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
BinderDataRequestSetup* setup = user_data;
BinderDataRequest* dr = &setup->req;
@@ -1335,6 +1382,7 @@ gboolean
binder_data_call_retry(
BinderDataRequestSetup* setup)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
BinderDataRequest* dr = &setup->req;
const BinderDataOptions* options = &dr->data->options;
@@ -1369,6 +1417,7 @@ binder_data_call_setup_cb(
const GBinderReader* args,
gpointer user_data)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
BinderDataRequestSetup* setup = user_data;
BinderDataRequest* dr = &setup->req;
BinderDataObject* self = dr->data;
@@ -1504,6 +1553,7 @@ gboolean
binder_data_call_setup_submit(
BinderDataRequest* dr)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
BinderDataRequestSetup* setup = G_CAST(dr, BinderDataRequestSetup, req);
BinderDataObject* data = dr->data;
BinderNetwork* network = data->network;
@@ -1711,6 +1761,7 @@ void
binder_data_call_setup_free(
BinderDataRequest* dr)
{
DBG("func:%s,line:%d,file:%s", __func__, __LINE__, __FILE__);
BinderDataRequestSetup* setup = G_CAST(dr, BinderDataRequestSetup, req);
g_free(setup->apn);