Merge branch 'win32-visibility-event_debug_logging_mask_'

* win32-visibility-event_debug_logging_mask_:
  Introduce EVENT_VISIBILITY_WANT_DLLIMPORT
  regress_http: use TT_BLAZER() over event_debug()

Fixes: #702
(cherry picked from commit fb8666453ce8bb1d599a68636bed5db5ef4a7a57)
This commit is contained in:
Azat Khuzhin 2018-10-28 19:48:37 +03:00 committed by Azat Khuzhin
parent 1c86523852
commit 349081e143
No known key found for this signature in database
GPG Key ID: B86086848EF8686D
3 changed files with 16 additions and 11 deletions

View File

@ -55,7 +55,8 @@
#if defined(_MSC_VER)
# if defined(event_core_shared_EXPORTS) /** from core export */
# define EVENT2_CORE_EXPORT_SYMBOL __declspec(dllexport)
# elif defined(event_extra_shared_EXPORTS) /** from extra import */
# elif defined(event_extra_shared_EXPORTS) || /** from extra import */ \
defined(EVENT_VISIBILITY_WANT_DLLIMPORT)
# define EVENT2_CORE_EXPORT_SYMBOL __declspec(dllimport)
# endif
#endif /* _MSC_VER */

View 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) {

View File

@ -23,6 +23,10 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/** For event_debug() usage/coverage */
#define EVENT_VISIBILITY_WANT_DLLIMPORT
#include "../util-internal.h"
#ifdef _WIN32