Skip to content

Commit

Permalink
[mms-ofono] Tweaking log levels
Browse files Browse the repository at this point in the history
Mostly, changing log levels of some messages from VERBOSE to DEBUG to make
them available in release build and simplify on-device debugging.
  • Loading branch information
monich committed Mar 27, 2014
1 parent d83579a commit 553a9a8
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 8 deletions.
2 changes: 1 addition & 1 deletion mms-lib/src/mms_dispatcher.c
Expand Up @@ -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) {
Expand Down
5 changes: 3 additions & 2 deletions mms-ofono/src/mms_ofono_connection.c
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
}

/*
Expand Down
4 changes: 2 additions & 2 deletions mms-ofono/src/mms_ofono_context.c
Expand Up @@ -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(
Expand All @@ -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));
}
}
Expand Down
12 changes: 9 additions & 3 deletions mms-ofono/src/mms_ofono_modem.c
Expand Up @@ -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;
}
}

Expand Down Expand Up @@ -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);
Expand All @@ -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;
Expand All @@ -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;
}
Expand Down

0 comments on commit 553a9a8

Please sign in to comment.