more debug output (MOREDEBUG)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
0.3.3
|
||||
=====
|
||||
23-Apr-2003: - FAQ updates: RTP internals
|
||||
- more debug and error testing (MOREDEBUG)
|
||||
6-Apr-2003: - build options for FLI4L builds (libc5 & uClibc)
|
||||
|
||||
0.3.2
|
||||
|
||||
+4
-1
@@ -19,7 +19,10 @@
|
||||
#
|
||||
|
||||
|
||||
EXTRA_DIST = siproxd.conf.example siproxd_passwd.cfg FAQ
|
||||
EXTRA_DIST = siproxd.conf.example \
|
||||
siproxd_passwd.cfg \
|
||||
FAQ \
|
||||
FLI4L_HOWTO.txt
|
||||
|
||||
|
||||
install-data-local:
|
||||
|
||||
+1
-1
@@ -165,7 +165,7 @@ int proxy_request (sip_t *request) {
|
||||
|
||||
/* if this is CANCEL/BYE request, stop RTP proxying */
|
||||
if (MSG_IS_BYE(request) || MSG_IS_CANCEL(request)) {
|
||||
#ifdef MODEDEBUG /*&&&&*/
|
||||
#ifdef MOREDEBUG /*&&&&*/
|
||||
INFO("stopping RTP proxy stream for: %s@%s",
|
||||
msg_getcall_id(request)->number, msg_getcall_id(request)->host);
|
||||
#endif
|
||||
|
||||
+9
-3
@@ -141,6 +141,9 @@ void *rtpproxy_main(void *arg) {
|
||||
tv.tv_usec = 0;
|
||||
|
||||
num_fd=select(fd_max+1, &fdset, NULL, NULL, &tv);
|
||||
#ifdef MOREDEBUG /*&&&&*/
|
||||
if (num_fd<0) {WARN("select() returned error [%s]",strerror(errno));}
|
||||
#endif
|
||||
time(&t);
|
||||
|
||||
if (configuration.rtp_proxy_enable) {
|
||||
@@ -159,6 +162,9 @@ void *rtpproxy_main(void *arg) {
|
||||
|
||||
/* read from sock rtp_proxytable[i].sock*/
|
||||
count=read(rtp_proxytable[i].sock, rtp_buff, RTP_BUFFER_SIZE);
|
||||
#ifdef MOREDEBUG /*&&&&*/
|
||||
if (read<0) {WARN("read() returned error [%s]",strerror(errno));}
|
||||
#endif
|
||||
|
||||
/* write to dest via socket rtp_inbound*/
|
||||
sipsock_send_udp(&rtp_socket,
|
||||
@@ -182,7 +188,7 @@ void *rtpproxy_main(void *arg) {
|
||||
/* time one has expired, clean it up */
|
||||
callid.number=rtp_proxytable[i].callid_number;
|
||||
callid.host=rtp_proxytable[i].callid_host;
|
||||
#ifdef MODEDEBUG /*&&&&*/
|
||||
#ifdef MOREDEBUG /*&&&&*/
|
||||
INFO("RTP stream sock=%i %s@%s (idx=%i) "
|
||||
"has expired", rtp_proxytable[i].sock,
|
||||
callid.number, callid.host, i);
|
||||
@@ -239,7 +245,7 @@ int rtp_start_fwd (call_id_t *callid, int media_stream_no,
|
||||
return STS_FAILURE;
|
||||
}
|
||||
|
||||
#ifdef MODEDEBUG /*&&&&*/
|
||||
#ifdef MOREDEBUG /*&&&&*/
|
||||
INFO("starting RTP proxy stream for: %s@%s #=%i",
|
||||
callid->number, callid->host, media_stream_no);
|
||||
#endif
|
||||
@@ -410,7 +416,7 @@ int rtp_stop_fwd (call_id_t *callid, int nolock) {
|
||||
return STS_FAILURE;
|
||||
}
|
||||
|
||||
#ifdef MODEDEBUG /*&&&&*/
|
||||
#ifdef MOREDEBUG /*&&&&*/
|
||||
INFO("stopping RTP proxy stream for: %s@%s",
|
||||
callid->number, callid->host);
|
||||
#endif
|
||||
|
||||
+5
-5
@@ -161,17 +161,17 @@ int main (int argc, char *argv[])
|
||||
#endif
|
||||
log_set_tosyslog(1);
|
||||
}
|
||||
#ifdef MODEDEBUG /*&&&&*/
|
||||
#ifdef MOREDEBUG /*&&&&*/
|
||||
INFO("daemonizing done (pid=%i)", getpid());
|
||||
#endif
|
||||
|
||||
/* initialize the RTP proxy thread */
|
||||
#ifdef MODEDEBUG /*&&&&*/
|
||||
#ifdef MOREDEBUG /*&&&&*/
|
||||
INFO("b4 rtpproxy_init");
|
||||
#endif
|
||||
atexit(rtpproxy_kill); /* cancel RTP thread at exit */
|
||||
rtpproxy_init();
|
||||
#ifdef MODEDEBUG /*&&&&*/
|
||||
#ifdef MOREDEBUG /*&&&&*/
|
||||
INFO("rtpproxy_init done");
|
||||
#endif
|
||||
|
||||
@@ -188,7 +188,7 @@ INFO("rtpproxy_init done");
|
||||
ERROR("unable to bind to SIP listening socket - aborting");
|
||||
exit(1);
|
||||
}
|
||||
#ifdef MODEDEBUG /*&&&&*/
|
||||
#ifdef MOREDEBUG /*&&&&*/
|
||||
INFO("sipsock_listen done");
|
||||
#endif
|
||||
|
||||
@@ -214,7 +214,7 @@ INFO("sipsock_listen done");
|
||||
|
||||
i=sipsock_read(&buff, sizeof(buff), &from);
|
||||
|
||||
#ifdef MODEDEBUG /*&&&&*/
|
||||
#ifdef MOREDEBUG /*&&&&*/
|
||||
{char tmp[32];
|
||||
strncpy(tmp, buff, 30);
|
||||
tmp[30]='\0';
|
||||
|
||||
+7
-1
@@ -86,7 +86,10 @@ int sipsock_wait(void) {
|
||||
FD_ZERO(&fdset);
|
||||
FD_SET (listen_socket, &fdset);
|
||||
sts=select (listen_socket+1, &fdset, NULL, NULL, &timeout);
|
||||
|
||||
#ifdef MOREDEBUG /*&&&&*/
|
||||
if (sts<0) {WARN("select() returned error [%s]",strerror(errno));}
|
||||
#endif
|
||||
|
||||
return sts;
|
||||
}
|
||||
|
||||
@@ -103,6 +106,9 @@ int sipsock_read(void *buf, size_t bufsize, struct sockaddr_in *from) {
|
||||
fromlen=sizeof(struct sockaddr_in);
|
||||
count=recvfrom(listen_socket, buf, bufsize, 0,
|
||||
(struct sockaddr *)from, &fromlen);
|
||||
#ifdef MOREDEBUG /*&&&&*/
|
||||
if (count<0) {WARN("recvfrom() returned error [%s]",strerror(errno));}
|
||||
#endif
|
||||
|
||||
DEBUGC(DBCLASS_NET,"received UDP packet from %s, count=%i",
|
||||
inet_ntoa(from->sin_addr), count);
|
||||
|
||||
Reference in New Issue
Block a user