Commit 6f08143e authored by gejun's avatar gejun

Patch svn r35149

parent 83d6540d
......@@ -7,7 +7,7 @@ include config.mk
# 3. Removed -Werror: Not block compilation for non-vital warnings, especially when the
# code is tested on newer systems. If the code is used in production, add -Werror back
CPPFLAGS=-DBTHREAD_USE_FAST_PTHREAD_MUTEX -D__const__= -D_GNU_SOURCE -DUSE_SYMBOLIZE -DNO_TCMALLOC -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -DBRPC_REVISION=\"$(shell git rev-parse --short HEAD)\"
CXXFLAGS=$(CPPFLAGS) -g -O2 -pipe -Wall -W -fPIC -fstrict-aliasing -Wno-invalid-offsetof -Wno-unused-parameter -fno-omit-frame-pointer -std=c++0x -include brpc/config.h
CXXFLAGS=$(CPPFLAGS) -g -O2 -pipe -Wall -W -fPIC -fstrict-aliasing -Wno-invalid-offsetof -Wno-unused-parameter -fno-omit-frame-pointer -std=c++0x
CFLAGS=$(CPPFLAGS) -g -O2 -pipe -Wall -W -fPIC -fstrict-aliasing -Wno-unused-parameter -fno-omit-frame-pointer
HDRPATHS=-I./src $(addprefix -I, $(HDRS))
LIBPATHS = $(addprefix -L, $(LIBS))
......
......@@ -8,9 +8,8 @@
#include "base/sys_byteorder.h"
#include "base/logging.h"
#include "base/find_cstr.h"
#include "brpc/log.h"
#include "brpc/amf.h"
#include "brpc/config.h"
namespace brpc {
......
......@@ -8,6 +8,7 @@
#include <gflags/gflags.h>
#include "base/files/file_enumerator.h"
#include "base/file_util.h" // base::FilePath
#include "brpc/log.h"
#include "brpc/controller.h"
#include "brpc/server.h"
#include "brpc/reloadable_flags.h"
......
......@@ -15,6 +15,7 @@
#include "base/file_util.h" // base::FilePath
#include "base/files/scoped_file.h" // ScopedFILE
#include "base/time.h"
#include "brpc/log.h"
#include "brpc/controller.h" // Controller
#include "brpc/closure_guard.h" // ClosureGuard
#include "brpc/builtin/pprof_service.h"
......
......@@ -4,6 +4,7 @@
// Author: The baidu-rpc authors (pbrpc@baidu.com)
// Date: 2014/11/06 15:28:43
#include "brpc/log.h"
#include "brpc/controller.h" // Controller
#include "brpc/closure_guard.h" // ClosureGuard
#include "brpc/builtin/vlog_service.h"
......
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
// Author: The baidu-rpc authors (pbrpc@baidu.com)
// Date: Sun Sep 14 22:53:17 CST 2014
#ifndef BRPC_CONFIG_H
#define BRPC_CONFIG_H
#include <inttypes.h> // PRId64 PRIu64
//#define BRPC_SOCKET_HAS_EOF
//#define BRPC_ADDITIONAL_EPOLL
#define RPC_VLOG_LEVEL 99
#define RPC_VLOG_IS_ON VLOG_IS_ON(RPC_VLOG_LEVEL)
#define RPC_VLOG VLOG(RPC_VLOG_LEVEL)
#define RPC_VPLOG VPLOG(RPC_VLOG_LEVEL)
#define RPC_VLOG_IF(cond) VLOG_IF(RPC_VLOG_LEVEL, (cond))
#define RPC_VPLOG_IF(cond) VPLOG_IF(RPC_VLOG_LEVEL, (cond))
#endif // BRPC_CONFIG_H
......@@ -15,6 +15,7 @@
#include "base/endpoint.h"
#include "base/base64.h"
#include "bthread/bthread.h" // bthread_usleep
#include "brpc/log.h"
#include "brpc/reloadable_flags.h"
#include "brpc/details/http_message.h"
......
......@@ -10,6 +10,7 @@
#include "bthread/butex.h"
#include "base/scoped_lock.h"
#include "base/logging.h"
#include "brpc/log.h"
#include "brpc/socket_map.h"
#include "brpc/details/naming_service_thread.h"
......
......@@ -7,8 +7,8 @@
#ifndef BRPC_DETAILS_RTMP_UTILS_H
#define BRPC_DETAILS_RTMP_UTILS_H
#include <stdint.h>
#include <cstddef>
#include <stdint.h> // int32_t
#include <stddef.h> // size_t
namespace brpc {
......
......@@ -11,6 +11,8 @@
namespace brpc {
BAIDU_CASSERT(sizeof(nshead_t) == 36, sizeof_nshead_must_be_36);
NsheadService::NsheadService() : _additional_space(0) {
_status = new (std::nothrow) MethodStatus;
LOG_IF(FATAL, _status == NULL) << "Fail to new MethodStatus";
......
......@@ -5,6 +5,7 @@
// Date: Fri Sep 4 00:11:10 CST 2015
#include "base/containers/flat_map.h"
#include "brpc/log.h"
#include "brpc/load_balancer.h"
#include "brpc/details/naming_service_thread.h"
#include "brpc/partition_channel.h"
......
......@@ -7,10 +7,10 @@
#include <gflags/gflags.h>
#include "base/logging.h"
#include "bthread/bthread.h"
#include "brpc/log.h"
#include "brpc/reloadable_flags.h"
#include "brpc/periodic_naming_service.h"
namespace brpc {
DEFINE_int32(ns_access_interval, 5,
......
......@@ -23,6 +23,7 @@
#include "base/logging.h"
#include "base/ssl_compat.h"
#include "brpc/log.h"
#include "brpc/policy/dh.h"
namespace brpc {
......
......@@ -8,6 +8,7 @@
#include <stdlib.h> // strtol
#include <string> // std::string
#include "bthread/bthread.h"
#include "brpc/log.h"
#include "brpc/policy/domain_naming_service.h"
......
......@@ -10,6 +10,7 @@
#include "base/files/file_watcher.h" // FileWatcher
#include "base/files/scoped_file.h" // ScopedFILE
#include "bthread/bthread.h" // bthread_usleep
#include "brpc/log.h"
#include "brpc/policy/file_naming_service.h"
......
......@@ -8,6 +8,7 @@
#include <string> // std::string
#include <set> // std::set
#include "base/string_splitter.h" // StringSplitter
#include "brpc/log.h"
#include "brpc/policy/list_naming_service.h"
......
......@@ -8,6 +8,7 @@
#include <gflags/gflags.h>
#include "base/time.h" // gettimeofday_us
#include "base/fast_rand.h"
#include "brpc/log.h"
#include "brpc/socket.h"
#include "brpc/reloadable_flags.h"
#include "brpc/policy/locality_aware_load_balancer.h"
......
......@@ -7,10 +7,9 @@
#include <google/protobuf/descriptor.h> // MethodDescriptor
#include <google/protobuf/message.h> // Message
#include <gflags/gflags.h>
#include "base/time.h"
#include "base/iobuf.h" // base::IOBuf
#include "brpc/log.h"
#include "brpc/controller.h" // Controller
#include "brpc/socket.h" // Socket
#include "brpc/server.h" // Server
......
......@@ -10,6 +10,7 @@
#include <set> // std::set
#include "bthread/bthread.h" // bthread_usleep
#include "base/iobuf.h"
#include "brpc/log.h"
#include "brpc/channel.h"
#include "brpc/policy/remote_file_naming_service.h"
......
......@@ -10,6 +10,7 @@
#include "base/scoped_lock.h"
#include "base/fast_rand.h"
#include "base/sys_byteorder.h"
#include "brpc/log.h"
#include "brpc/server.h"
#include "brpc/details/controller_private_accessor.h"
#include "brpc/details/server_private_accessor.h"
......
......@@ -14,8 +14,9 @@
#include "base/time.h"
#include "base/iobuf.h" // base::IOBuf
#include "base/raw_pack.h" // RawPacker RawUnpacker
#include "brpc/streaming_rpc_meta.pb.h" // StreamFrameMeta
#include "brpc/log.h"
#include "brpc/socket.h" // Socket
#include "brpc/streaming_rpc_meta.pb.h" // StreamFrameMeta
#include "brpc/policy/most_common_message.h"
#include "brpc/stream_impl.h"
......
......@@ -5,6 +5,7 @@
// Date: Fri Jun 5 18:25:40 CST 2015
#include "base/logging.h"
#include "brpc/log.h"
#include "brpc/redis_command.h"
// Defined in public/iobuf/base/iobuf.cpp
......
......@@ -5,6 +5,7 @@
// Date: 2016-02-27 15:33:29
#include <google/protobuf/descriptor.h>
#include "brpc/log.h"
#include "brpc/restful.h"
#include "brpc/details/method_status.h"
......
......@@ -12,6 +12,7 @@
#include "base/fast_rand.h"
#include "base/files/file_enumerator.h"
#include "bvar/bvar.h"
#include "brpc/log.h"
#include "brpc/reloadable_flags.h"
#include "brpc/rpc_dump.h"
#include "brpc/protocol.h"
......
......@@ -7,6 +7,7 @@
#include <gflags/gflags.h>
#include <google/protobuf/io/zero_copy_stream_impl_lite.h> // StringOutputStream
#include "bthread/unstable.h" // bthread_timer_del
#include "brpc/log.h"
#include "brpc/callback.h" // Closure
#include "brpc/channel.h" // Channel
#include "brpc/socket_map.h" // SocketMap
......
......@@ -19,6 +19,7 @@
#include "base/time.h"
#include "base/class_name.h"
#include "base/string_printf.h"
#include "brpc/log.h"
#include "brpc/compress.h"
#include "brpc/policy/nova_pbrpc_protocol.h"
#include "brpc/global.h"
......
......@@ -18,6 +18,7 @@
#include "base/macros.h"
#include "base/class_name.h" // base::class_name
#include "bvar/bvar.h"
#include "brpc/log.h"
#include "brpc/reloadable_flags.h" // BRPC_VALIDATE_GFLAG
#include "brpc/errno.pb.h"
#include "brpc/event_dispatcher.h" // RemoveConsumer
......
......@@ -9,6 +9,7 @@
#include "base/time.h"
#include "base/scoped_lock.h"
#include "base/logging.h"
#include "brpc/log.h"
#include "brpc/protocol.h"
#include "brpc/input_messenger.h"
#include "brpc/reloadable_flags.h"
......
......@@ -11,6 +11,7 @@
#include "base/object_pool.h"
#include "base/unique_ptr.h"
#include "bthread/unstable.h"
#include "brpc/log.h"
#include "brpc/socket.h"
#include "brpc/controller.h"
#include "brpc/input_messenger.h"
......
......@@ -12,6 +12,7 @@
#include <sys/types.h>
#include <pwd.h>
#include "base/fast_rand.h"
#include "brpc/log.h"
#include "brpc/channel.h"
#include "brpc/trackme.pb.h"
#include "brpc/policy/hasher.h"
......
......@@ -4,8 +4,9 @@
// Author: The baidu-rpc authors (pbrpc@baidu.com)
// Date: Wed Sep 21 17:25:56 CST 2016
#include "brpc/ts.h"
#include "brpc/log.h"
#include "brpc/policy/rtmp_protocol.h"
#include "brpc/ts.h"
namespace brpc {
......
......@@ -4,6 +4,7 @@
// Author: The baidu-rpc authors (pbrpc@baidu.com)
// Date 2014/10/27 10:31:51
#include "brpc/log.h"
#include "brpc/details/http_parser.h" // http_parser_parse_url
#include "brpc/uri.h" // URI
......
......@@ -20,6 +20,7 @@
#include "brpc/acceptor.h"
#include "brpc/policy/hulu_pbrpc_protocol.h"
#include "brpc/policy/most_common_message.h"
#include "brpc/nshead.h"
#define CONNECT_IN_KEEPWRITE 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment