Files
TencentOS-tiny/components/connectivity/iotkit-embedded-3.0.1/3rdparty/external_libs/nghttp2/nghttp2_debug.c
dcxajichu 8c24d921b0 support aliyun sdk on TencentOS tiny
sample: examples\aliyun_iotkit_csdk_mqtt
project: board\TencentOS_tiny_EVB_MX_Plus\KEIL\aliyun_iotkit_csdk_mqtt
2019-10-31 16:36:28 +08:00

42 lines
983 B
C

/*
* Copyright (C) 2015-2018 Alibaba Group Holding Limited
*/
#include "nghttp2_debug.h"
#include <stdio.h>
#ifdef DEBUGBUILD
static void nghttp2_default_debug_vfprintf_callback(const char *fmt,
va_list args) {
vfprintf(stderr, fmt, args);
}
static nghttp2_debug_vprintf_callback static_debug_vprintf_callback =
nghttp2_default_debug_vfprintf_callback;
void nghttp2_debug_vprintf(const char *format, ...) {
if (static_debug_vprintf_callback) {
va_list args;
va_start(args, format);
static_debug_vprintf_callback(format, args);
va_end(args);
}
}
void nghttp2_set_debug_vprintf_callback(
nghttp2_debug_vprintf_callback debug_vprintf_callback) {
static_debug_vprintf_callback = debug_vprintf_callback;
}
#else /* !DEBUGBUILD */
void nghttp2_set_debug_vprintf_callback(
nghttp2_debug_vprintf_callback debug_vprintf_callback) {
(void)debug_vprintf_callback;
}
#endif /* !DEBUGBUILD */