Skip to content

Commit

Permalink
[mms_task_http] Tweaking debug log
Browse files Browse the repository at this point in the history
  • Loading branch information
monich committed Apr 3, 2014
1 parent 509f70e commit 341ec2d
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions mms-lib/src/mms_task_http.c
Expand Up @@ -281,7 +281,17 @@ mms_task_http_finished(
MMS_HTTP_STATE next_http_state;
MMSTask* task = &http->task;
SoupStatus http_status = msg->status_code;
MMS_DEBUG("HTTP status %u", msg->status_code);

#if MMS_LOG_DEBUG
if (priv->bytes_received) {
MMS_DEBUG("HTTP status %u [%s] %u byte(s)", msg->status_code,
soup_message_headers_get_content_type(msg->response_headers,
NULL), priv->bytes_received);
} else {
MMS_DEBUG("HTTP status %u", msg->status_code);
}
#endif /* MMS_LOG_DEBUG */

if (SOUP_STATUS_IS_SUCCESSFUL(msg->status_code)) {
next_http_state = MMS_HTTP_DONE;
mms_task_set_state(task, MMS_TASK_STATE_DONE);
Expand All @@ -297,7 +307,7 @@ mms_task_http_finished(
}
} else {
next_http_state = MMS_HTTP_DONE;
MMS_WARN("HTTP failure %u", msg->status_code);
MMS_WARN("HTTP error %u", msg->status_code);
mms_task_set_state(task, MMS_TASK_STATE_DONE);
}
}
Expand Down

0 comments on commit 341ec2d

Please sign in to comment.