]> granicus.if.org Git - libevent/commitdiff
regress_http: use TT_BLAZER() over event_debug()
authorAzat Khuzhin <a3at.mail@gmail.com>
Sun, 28 Oct 2018 16:27:05 +0000 (19:27 +0300)
committerAzat Khuzhin <a3at.mail@gmail.com>
Sun, 28 Oct 2018 16:45:52 +0000 (19:45 +0300)
Later is pretty tricky due to exporting event_debug_logging_mask_ symbol
for win32.

test/regress_http.c

index 3a3604a3394e805e86a18e1c0f53ae9d0cf7cce3..b81e045f3bc2e3ff23cae1a462d86f0209e96634 100644 (file)
@@ -316,7 +316,7 @@ http_basic_cb(struct evhttp_request *req, void *arg)
        struct evhttp_connection *evcon;
        int empty = evhttp_find_header(evhttp_request_get_input_headers(req), "Empty") != NULL;
 
-       event_debug(("%s: called\n", __func__));
+       TT_BLATHER(("%s: called\n", __func__));
        evbuffer_add_printf(evb, BASIC_REQUEST_BODY);
 
        evcon = evhttp_request_get_connection(req);
@@ -438,7 +438,7 @@ http_chunked_cb(struct evhttp_request *req, void *arg)
 {
        struct timeval when = { 0, 0 };
        struct chunk_req_state *state = malloc(sizeof(struct chunk_req_state));
-       event_debug(("%s: called\n", __func__));
+       TT_BLATHER(("%s: called\n", __func__));
 
        memset(state, 0, sizeof(struct chunk_req_state));
        state->req = req;
@@ -631,7 +631,7 @@ http_badreq_cb(struct evhttp_request *req, void *arg)
 static void
 http_badreq_errorcb(struct bufferevent *bev, short what, void *arg)
 {
-       event_debug(("%s: called (what=%04x, arg=%p)", __func__, what, arg));
+       TT_BLATHER(("%s: called (what=%04x, arg=%p)", __func__, what, arg));
        /* ignore */
 }
 
@@ -677,7 +677,7 @@ http_badreq_readcb(struct bufferevent *bev, void *arg)
 static void
 http_badreq_successcb(evutil_socket_t fd, short what, void *arg)
 {
-       event_debug(("%s: called (what=%04x, arg=%p)", __func__, what, arg));
+       TT_BLATHER(("%s: called (what=%04x, arg=%p)", __func__, what, arg));
        event_base_loopexit(exit_base, NULL);
 }
 
@@ -793,7 +793,7 @@ http_delete_cb(struct evhttp_request *req, void *arg)
                exit(1);
        }
 
-       event_debug(("%s: called\n", __func__));
+       TT_BLATHER(("%s: called\n", __func__));
        evbuffer_add_printf(evb, BASIC_REQUEST_BODY);
 
        /* allow sending of an empty reply */
@@ -864,7 +864,7 @@ http_sent_cb(struct evhttp_request *req, void *arg)
                exit(1);
        }
 
-       event_debug(("%s: called\n", __func__));
+       TT_BLATHER(("%s: called\n", __func__));
 
        ++test_ok;
 }
@@ -876,7 +876,7 @@ http_on_complete_cb(struct evhttp_request *req, void *arg)
 
        evhttp_request_set_on_complete_cb(req, http_sent_cb, (void *)0xDEADBEEF);
 
-       event_debug(("%s: called\n", __func__));
+       TT_BLATHER(("%s: called\n", __func__));
        evbuffer_add_printf(evb, BASIC_REQUEST_BODY);
 
        /* allow sending of an empty reply */
@@ -1871,7 +1871,7 @@ http_dispatcher_cb(struct evhttp_request *req, void *arg)
 {
 
        struct evbuffer *evb = evbuffer_new();
-       event_debug(("%s: called\n", __func__));
+       TT_BLATHER(("%s: called\n", __func__));
        evbuffer_add_printf(evb, "DISPATCHER_TEST");
 
        evhttp_send_reply(req, HTTP_OK, "Everything is fine", evb);
@@ -2029,7 +2029,7 @@ void
 http_post_cb(struct evhttp_request *req, void *arg)
 {
        struct evbuffer *evb;
-       event_debug(("%s: called\n", __func__));
+       TT_BLATHER(("%s: called\n", __func__));
 
        /* Yes, we are expecting a post request */
        if (evhttp_request_get_command(req) != EVHTTP_REQ_POST) {
@@ -2146,7 +2146,7 @@ void
 http_put_cb(struct evhttp_request *req, void *arg)
 {
        struct evbuffer *evb;
-       event_debug(("%s: called\n", __func__));
+       TT_BLATHER(("%s: called\n", __func__));
 
        /* Expecting a PUT request */
        if (evhttp_request_get_command(req) != EVHTTP_REQ_PUT) {