... | ... |
@@ -21,21 +21,22 @@ NAME=ser |
21 | 21 |
# implementation still nasty and reports per-process |
22 | 22 |
# NO_DEBUG turns off some of the debug messages (DBG(...)). |
23 | 23 |
# NO_LOG completely turns of all the logging (and DBG(...)) |
24 |
-# DEBUG compiles in some extra debugging code |
|
24 |
+# EXTRA_DEBUG compiles in some extra debugging code |
|
25 | 25 |
# DNS_IP_HACK faster ip address resolver for ip strings (e.g "127.0.0.1") |
26 | 26 |
# SHM_MEM compiles in shared mem. support, needed by some modules and |
27 | 27 |
# by USE_SHM_MEM |
28 | 28 |
# PKG_MALLOC uses a faster malloc (exclusive w/ USE_SHM_MEM) |
29 | 29 |
# USE_SHM_MEM all pkg_malloc => shm_malloc (most mallocs use a common sh. mem. |
30 | 30 |
# segment); don't define PKG_MALLOC if you want this! |
31 |
-# DBG_QM_MALLOC - qm_malloc debug code, will cause pkg_malloc and shm_malloc |
|
31 |
+# DBG_QM_MALLOC - qm_malloc debug code, will cause pkg_malloc and shm_malloc |
|
32 | 32 |
# to keep and display lot of debuging information: file name, |
33 | 33 |
# function, line number of malloc/free call for each block, |
34 | 34 |
# extra error checking (trying to free the same pointer |
35 | 35 |
# twice, trying to free a pointer alloc'ed with a different |
36 | 36 |
# malloc etc.) |
37 |
-DEFS=-DTHREAD -DNOCR -DMACROEATER -DDNS_IP_HACK -DSHM_MEM \ |
|
38 |
- -DPKG_MALLOC -DDBG_QM_MALLOC #-DNO_DEBUG |
|
37 |
+DEFS=-DNOCR -DMACROEATER -DDNS_IP_HACK -DSHM_MEM \ |
|
38 |
+ -DPKG_MALLOC -DDBG_QM_MALLOC |
|
39 |
+#-DEXTRA_DEBUG |
|
39 | 40 |
# -DUSE_SHM_MEM |
40 | 41 |
#-DNO_DEBUG |
41 | 42 |
#-DPKG_MALLOC |
... | ... |
@@ -57,12 +57,27 @@ static char flags[]= |
57 | 57 |
#ifdef NO_LOG |
58 | 58 |
", NO_LOG" |
59 | 59 |
#endif |
60 |
-#ifdef DEBUG |
|
61 |
-", DEBUG" |
|
60 |
+#ifdef EXTRA_DEBUG |
|
61 |
+", EXTRA_DEBUG" |
|
62 | 62 |
#endif |
63 | 63 |
#ifdef DNS_IP_HACK |
64 | 64 |
", DNS_IP_HACK" |
65 | 65 |
#endif |
66 |
+#ifdef SHM_MEM |
|
67 |
+", SHM_MEM" |
|
68 |
+#endif |
|
69 |
+#ifdef PKG_MALLOC |
|
70 |
+", PKG_MALLOC" |
|
71 |
+#endif |
|
72 |
+#ifdef USE_SHM_MEM |
|
73 |
+", USE_SHM_MEM" |
|
74 |
+#endif |
|
75 |
+#ifdef DBG_QM_MALLOC |
|
76 |
+", DBG_QM_MALLOC" |
|
77 |
+#endif |
|
78 |
+#ifdef DEBUG_DMALLOC |
|
79 |
+", DEBUG_DMALLOC" |
|
80 |
+#endif |
|
66 | 81 |
; |
67 | 82 |
|
68 | 83 |
static char help_msg[]= "\ |
... | ... |
@@ -267,10 +267,10 @@ char* get_hdr_field(char* buf, char* end, struct hdr_field* hdr) |
267 | 267 |
hdr->name.s, hdr->type); |
268 | 268 |
goto error; |
269 | 269 |
} |
270 |
+ tmp=match; |
|
270 | 271 |
}while( match<end &&( (*match==' ')||(*match=='\t') ) ); |
271 | 272 |
*(match-1)=0; /*null terminate*/ |
272 | 273 |
hdr->body.len=match-hdr->body.s; |
273 |
- tmp=match; |
|
274 | 274 |
break; |
275 | 275 |
default: |
276 | 276 |
LOG(L_CRIT, "BUG: get_hdr_field: unknown header type %d\n", |
... | ... |
@@ -618,7 +618,7 @@ int parse_headers(struct sip_msg* msg, int flags) |
618 | 618 |
msg->last_header->next=hf; |
619 | 619 |
msg->last_header=hf; |
620 | 620 |
} |
621 |
- #ifdef DEBUG |
|
621 |
+ #ifdef EXTRA_DEBUG |
|
622 | 622 |
DBG("header field type %d, name=<%s>, body=<%s>\n", |
623 | 623 |
hf->type, hf->name.s, hf->body.s); |
624 | 624 |
#endif |
... | ... |
@@ -688,7 +688,7 @@ int parse_msg(char* buf, unsigned int len, struct sip_msg* msg) |
688 | 688 |
second_via=0; |
689 | 689 |
if (parse_headers(msg, flags)==-1) goto error; |
690 | 690 |
|
691 |
-#ifdef DEBUG |
|
691 |
+#ifdef EXTRA_DEBUG |
|
692 | 692 |
/* dump parsed data */ |
693 | 693 |
if (msg->via1){ |
694 | 694 |
DBG(" first via: <%s/%s/%s> <%s:%s(%d)>", |
... | ... |
@@ -711,7 +711,7 @@ int parse_msg(char* buf, unsigned int len, struct sip_msg* msg) |
711 | 711 |
#endif |
712 | 712 |
|
713 | 713 |
|
714 |
-#ifdef DEBUG |
|
714 |
+#ifdef EXTRA_DEBUG |
|
715 | 715 |
DBG("exiting parse_msg\n"); |
716 | 716 |
#endif |
717 | 717 |
|
718 | 718 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,23 @@ |
1 |
+INVITE sip:p2@iptel.org SIP/2.0 |
|
2 |
+Via: SIP/2.0/UDP 193.175.133.193 |
|
3 |
+From: "GMD FOKUS iptlab" <sip:jiri@iptel.org>;tag=b96b0300ed30f1286-2f5d |
|
4 |
+To: <sip:p2@iptel.org> |
|
5 |
+ Call-ID: b96b0300-88d30f-66da-63aa@195.37.78.190 |
|
6 |
+CSeq: 101 INVITE |
|
7 |
+Expires: 180 |
|
8 |
+User-Agent: Cisco-SIP-IP-Phone/2 |
|
9 |
+Accept: application/sdp |
|
10 |
+Contact: sip:jiri@195.37.78.190:5060 |
|
11 |
+Content-Type: application/sdp |
|
12 |
+Content-Length: 225 |
|
13 |
+ |
|
14 |
+ |
|
15 |
+v=0 |
|
16 |
+o=CiscoSystemsSIP-IPPhone-UserAgent 14474 8233 IN IP4 195.37.78.190 |
|
17 |
+s=SIP Call |
|
18 |
+c=IN IP4 195.37.78.190 |
|
19 |
+t=0 0 |
|
20 |
+m=audio 18456 RTP/AVP 0 8 18 101 |
|
21 |
+a=rtpmap:0 pcmu/8000 |
|
22 |
+a=rtpmap:101 telephone-event/8000 |
|
23 |
+a=fmtp:101 0-11 |
0 | 24 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,23 @@ |
1 |
+INVITE sip:p2@iptel.org SIP/2.0 |
|
2 |
+Via: SIP/2.0/UDP 193.175.133.193 |
|
3 |
+From: "GMD FOKUS iptlab" <sip:jiri@iptel.org>;tag=b96b0300ed30f1286-2f5d |
|
4 |
+To: <sip:p2@iptel.org> |
|
5 |
+Call-ID: b96b0300-88d30f-66da-63aa@195.37.78.190 |
|
6 |
+CSeq:101 |
|
7 |
+Expires: 180 |
|
8 |
+User-Agent: Cisco-SIP-IP-Phone/2 |
|
9 |
+Accept: application/sdp |
|
10 |
+Contact: sip:jiri@195.37.78.190:5060 |
|
11 |
+Content-Type: application/sdp |
|
12 |
+Content-Length: 225 |
|
13 |
+ |
|
14 |
+ |
|
15 |
+v=0 |
|
16 |
+o=CiscoSystemsSIP-IPPhone-UserAgent 14474 8233 IN IP4 195.37.78.190 |
|
17 |
+s=SIP Call |
|
18 |
+c=IN IP4 195.37.78.190 |
|
19 |
+t=0 0 |
|
20 |
+m=audio 18456 RTP/AVP 0 8 18 101 |
|
21 |
+a=rtpmap:0 pcmu/8000 |
|
22 |
+a=rtpmap:101 telephone-event/8000 |
|
23 |
+a=fmtp:101 0-11 |
0 | 24 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,23 @@ |
1 |
+INVITE sip:p2@iptel.org SIP/2.0 |
|
2 |
+Via: SIP/2.0/UDP 193.175.133.193 |
|
3 |
+From: "GMD FOKUS iptlab" <sip:jiri@iptel.org>;tag=b96b0300ed30f1286-2f5d |
|
4 |
+To: <sip:p2@iptel.org> |
|
5 |
+Call-ID; b96b0300-88d30f-66da-63aa@195.37.78.190 |
|
6 |
+CSeq: 101 INVITE |
|
7 |
+Expires: 180 |
|
8 |
+User-Agent: Cisco-SIP-IP-Phone/2 |
|
9 |
+Accept: application/sdp |
|
10 |
+Contact: sip:jiri@195.37.78.190:5060 |
|
11 |
+Content-Type: application/sdp |
|
12 |
+Content-Length: 225 |
|
13 |
+ |
|
14 |
+ |
|
15 |
+v=0 |
|
16 |
+o=CiscoSystemsSIP-IPPhone-UserAgent 14474 8233 IN IP4 195.37.78.190 |
|
17 |
+s=SIP Call |
|
18 |
+c=IN IP4 195.37.78.190 |
|
19 |
+t=0 0 |
|
20 |
+m=audio 18456 RTP/AVP 0 8 18 101 |
|
21 |
+a=rtpmap:0 pcmu/8000 |
|
22 |
+a=rtpmap:101 telephone-event/8000 |
|
23 |
+a=fmtp:101 0-11 |
0 | 24 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,23 @@ |
1 |
+INVITE sip:p2@iptel.org SIP/2.0 |
|
2 |
+Via: SIP/2.0/UDP 193.175.133.193;branch= |
|
3 |
+From: "GMD FOKUS iptlab" <sip:jiri@iptel.org>;tag=b96b0300ed30f1286-2f5d |
|
4 |
+To: <sip:p2@iptel.org> |
|
5 |
+Call-ID: b96b0300-88d30f-66da-63aa@195.37.78.190 |
|
6 |
+CSeq: 101 INVITE |
|
7 |
+Expires: 180 |
|
8 |
+User-Agent: Cisco-SIP-IP-Phone/2 |
|
9 |
+Accept: application/sdp |
|
10 |
+Contact: sip:jiri@195.37.78.190:5060 |
|
11 |
+Content-Type: application/sdp |
|
12 |
+Content-Length: 225 |
|
13 |
+ |
|
14 |
+ |
|
15 |
+v=0 |
|
16 |
+o=CiscoSystemsSIP-IPPhone-UserAgent 14474 8233 IN IP4 195.37.78.190 |
|
17 |
+s=SIP Call |
|
18 |
+c=IN IP4 195.37.78.190 |
|
19 |
+t=0 0 |
|
20 |
+m=audio 18456 RTP/AVP 0 8 18 101 |
|
21 |
+a=rtpmap:0 pcmu/8000 |
|
22 |
+a=rtpmap:101 telephone-event/8000 |
|
23 |
+a=fmtp:101 0-11 |