Commit 07d474df authored by Slava Monich's avatar Slava Monich

Merge pull request #11 from monich/debug-trace

[mms-ofono] Tweaking log levels
parents c917f17e 553a9a8b
......@@ -552,7 +552,7 @@ mms_dispatcher_delegate_connection_state_changed(
{
MMSDispatcher* disp = mms_dispatcher_from_connection_delegate(delegate);
MMS_CONNECTION_STATE state = mms_connection_state(conn);
MMS_VERBOSE_("%s %s", conn->imsi, mms_connection_state_name(conn));
MMS_DEBUG("%s %s", conn->imsi, mms_connection_state_name(conn));
MMS_ASSERT(conn == disp->connection);
if (state == MMS_CONNECTION_STATE_FAILED ||
state == MMS_CONNECTION_STATE_CLOSED) {
......
......@@ -234,6 +234,7 @@ mms_ofono_connection_dispose(
GObject* object)
{
MMSOfonoConnection* ofono = MMS_OFONO_CONNECTION(object);
MMS_VERBOSE_("%p", ofono);
if (ofono->property_change_signal_id) {
g_signal_handler_disconnect(ofono->proxy,
ofono->property_change_signal_id);
......@@ -265,9 +266,9 @@ mms_ofono_connection_class_init(
static
void
mms_ofono_connection_init(
MMSOfonoConnection* conn)
MMSOfonoConnection* ofono)
{
MMS_VERBOSE_("%p", conn);
MMS_VERBOSE_("%p", ofono);
}
/*
......
......@@ -37,7 +37,7 @@ mms_ofono_context_property_changed(
if (!strcmp(key, OFONO_CONTEXT_PROPERTY_ACTIVE)) {
GVariant* value = g_variant_get_variant(variant);
context->active = g_variant_get_boolean(value);
MMS_VERBOSE_("%p %s = %d", context, key, context->active);
MMS_DEBUG("%s %sactive", context->path, context->active ? "" : "not ");
g_variant_unref(value);
if (context->active) {
if (context->connection && !mms_ofono_connection_set_state(
......@@ -56,7 +56,7 @@ mms_ofono_context_property_changed(
context->connection = NULL;
}
} else {
MMS_VERBOSE_("%p %s", context, key);
MMS_VERBOSE_("%s %s", context->path, key);
MMS_ASSERT(strcmp(key, OFONO_CONTEXT_PROPERTY_TYPE));
}
}
......
......@@ -150,8 +150,10 @@ mms_ofono_modem_gprs_context_removed(
{
MMS_VERBOSE_("%p %s", modem, path);
MMS_ASSERT(proxy == modem->gprs_proxy);
if (modem->mms_context && g_strcmp0(modem->mms_context->path, path)) {
if (modem->mms_context && !g_strcmp0(modem->mms_context->path, path)) {
MMS_DEBUG("MMS context %s removed", path);
mms_ofono_context_free(modem->mms_context);
modem->mms_context = NULL;
}
}
......@@ -282,7 +284,6 @@ mms_ofono_modem_scan_interfaces(
context_info = mms_ofono_modem_find_mms_context(m->gprs_proxy);
}
if (context_info) {
MMS_VERBOSE("MMS context: %s", context_info->path);
if (m->mms_context &&
!g_strcmp0(context_info->path, m->mms_context->path)) {
mms_ofono_context_free(m->mms_context);
......@@ -292,9 +293,13 @@ mms_ofono_modem_scan_interfaces(
m->mms_context = mms_ofono_context_new(m, context_info->path,
context_info->properties);
}
if (m->mms_context) {
MMS_DEBUG("MMS context: %s (%sactive)", m->mms_context->path,
m->mms_context->active ? "" : "not ");
}
mms_context_info_free(context_info);
} else {
MMS_VERBOSE("No MMS context");
MMS_DEBUG("No MMS context");
if (m->mms_context) {
mms_ofono_context_free(m->mms_context);
m->mms_context = NULL;
......@@ -303,6 +308,7 @@ mms_ofono_modem_scan_interfaces(
} else if (m->gprs_proxy) {
mms_ofono_modem_disconnect_gprs_proxy(m);
if (m->mms_context) {
MMS_DEBUG("No MMS context");
mms_ofono_context_free(m->mms_context);
m->mms_context = NULL;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment