Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[mms-lib] Print libsoup status phrases next to status codes. MER#1027
This makes the log easier to read.
  • Loading branch information
monich committed May 25, 2015
1 parent 66f562b commit 13d01cb
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions mms-lib/src/mms_task_http.c
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2013-2014 Jolla Ltd.
* Copyright (C) 2013-2015 Jolla Ltd.
* Contact: Slava Monich <slava.monich@jolla.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
Expand Down Expand Up @@ -292,7 +293,8 @@ mms_task_http_finished(
soup_message_headers_get_content_type(msg->response_headers,
NULL), priv->bytes_received);
} else {
MMS_DEBUG("HTTP status %u", msg->status_code);
MMS_DEBUG("HTTP status %u (%s)", msg->status_code,
soup_status_get_phrase(msg->status_code));
}
#endif /* MMS_LOG_DEBUG */

Expand All @@ -311,7 +313,8 @@ mms_task_http_finished(
}
} else {
next_http_state = MMS_HTTP_DONE;
MMS_WARN("HTTP error %u", msg->status_code);
MMS_WARN("HTTP error %u (%s)", msg->status_code,
soup_status_get_phrase(msg->status_code));
mms_task_set_state(task, MMS_TASK_STATE_DONE);
}
}
Expand Down

0 comments on commit 13d01cb

Please sign in to comment.