optionally compile with long debug messages. don't print messages twice when sending

git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@1900 8eb893ce-cfd4-0310-b710-fb5ebe64c474
sayer/1.4-spce2.6
Stefan Sayer 16 years ago
parent b6c310ca5e
commit 37e35c7ea7

@ -68,6 +68,13 @@ exclude_core_modules = sipctrl
#
USE_MONITORING=yes
# Support for long debug messages? (useful for debugging SIP messages' contents)
#
LONG_DEBUG_MESSAGE=yes
################### end of configuration section #######################
LDFLAGS += -lm
GETOS=$(COREPATH)/compat/getos
@ -99,9 +106,16 @@ endif
endif
ifdef USE_MONITORING
CPPFLAGS += -DUSE_MONITORING
CPPFLAGS += -DUSE_MONITORING
endif
ifdef LONG_DEBUG_MESSAGE
CPPFLAGS += -DLOG_BUFFER_LEN=2048
else
CPPFLAGS += -DLOG_BUFFER_LEN=512
endif
# Additions for Solaris support.
ifeq ($(OS),solaris)
CPPFLAGS += -DHAVE_SYS_SOCKIO_H -DBSD_COMP -fPIC -include compat/solaris.h

@ -104,7 +104,7 @@ enum Log_Level {
if ((level_) <= log_level) { \
pid_t pid_ = GET_PID(); \
pthread_t tid_ = GET_TID(); \
char msg_[512]; \
char msg_[LOG_BUFFER_LEN]; \
int n_ = snprintf(msg_, sizeof(msg_), fmt, ##args); \
if (msg_[n_ - 1] == '\n') msg_[n_ - 1] = '\0'; \
\

@ -818,10 +818,10 @@ int trans_layer::send_request(sip_msg* msg, trans_ticket* tt)
memcpy(&p_msg->remote_ip,&msg->remote_ip,sizeof(sockaddr_storage));
DBG("Sending to %s:%i <%.*s>\n",
DBG("Sending to %s:%i <%.*s...>\n",
get_addr_str(((sockaddr_in*)&p_msg->remote_ip)->sin_addr).c_str(),
ntohs(((sockaddr_in*)&p_msg->remote_ip)->sin_port),
p_msg->len,p_msg->buf);
50 /* preview - instead of p_msg->len */,p_msg->buf);
tt->_bucket = get_trans_bucket(p_msg->callid->value,
get_cseq(p_msg)->num_str);

Loading…
Cancel
Save