Misc (#1018):
 * httpdemo: make the 2nd parameter (output filename) optional (result will be printed to stdout if output file is not provided.
 * remove trailing "\n" from PJ_LOG.
 * change response.status_code from pj_str_t to pj_uint16_t.
 * remove PJ_EPENDING status checking from on_complete.



git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@3089 74dad513-b988-da41-8d7b-12977e46ad98
diff --git a/pjlib-util/src/pjlib-util-test/http_client.c b/pjlib-util/src/pjlib-util-test/http_client.c
index d179bbf..e31caf2 100644
--- a/pjlib-util/src/pjlib-util-test/http_client.c
+++ b/pjlib-util/src/pjlib-util-test/http_client.c
@@ -133,7 +133,7 @@
     PJ_UNUSED_ARG(hreq);
     PJ_UNUSED_ARG(data);
 
-    PJ_LOG(5, (THIS_FILE, "\nData received: %d bytes\n", size));
+    PJ_LOG(5, (THIS_FILE, "\nData received: %d bytes", size));
     if (size > 0) {
 #ifdef VERBOSE
         printf("%.*s\n", (int)size, (char *)data);
@@ -160,7 +160,7 @@
     *data = sdata;
     *size = sendsz;
 
-    PJ_LOG(5, (THIS_FILE, "\nSending data progress: %d out of %d bytes\n", 
+    PJ_LOG(5, (THIS_FILE, "\nSending data progress: %d out of %d bytes", 
            send_size, total_size));
 }
 
@@ -171,16 +171,16 @@
     PJ_UNUSED_ARG(hreq);
 
     if (status == PJ_ECANCELLED) {
-        PJ_LOG(5, (THIS_FILE, "Request cancelled\n"));
+        PJ_LOG(5, (THIS_FILE, "Request cancelled"));
         return;
     } else if (status == PJ_ETIMEDOUT) {
-        PJ_LOG(5, (THIS_FILE, "Request timed out!\n"));
+        PJ_LOG(5, (THIS_FILE, "Request timed out!"));
         return;
-    } else if (status != PJ_SUCCESS && status != PJ_EPENDING) {
-        PJ_LOG(3, (THIS_FILE, "Error %d\n", status));
+    } else if (status != PJ_SUCCESS) {
+        PJ_LOG(3, (THIS_FILE, "Error %d", status));
         return;
     }
-    PJ_LOG(5, (THIS_FILE, "\nData completed: %d bytes\n", resp->size));
+    PJ_LOG(5, (THIS_FILE, "\nData completed: %d bytes", resp->size));
     if (resp->size > 0 && resp->data) {
 #ifdef VERBOSE
         printf("%.*s\n", (int)resp->size, (char *)resp->data);
@@ -197,8 +197,8 @@
     PJ_UNUSED_ARG(i);
 
 #ifdef VERBOSE
-    printf("%.*s, %.*s, %.*s\n", STR_PREC(resp->version),
-           STR_PREC(resp->status_code), STR_PREC(resp->reason));
+    printf("%.*s, %d, %.*s\n", STR_PREC(resp->version),
+           resp->status_code, STR_PREC(resp->reason));
     for (i = 0; i < resp->headers.count; i++) {
         printf("%.*s : %.*s\n", 
                STR_PREC(resp->headers.header[i].name),