... | ... |
@@ -9,7 +9,7 @@ |
9 | 9 |
VERSION = 0 |
10 | 10 |
PATCHLEVEL = 8 |
11 | 11 |
SUBLEVEL = 6 |
12 |
-EXTRAVERSION = 2 |
|
12 |
+EXTRAVERSION = -3 |
|
13 | 13 |
|
14 | 14 |
RELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) |
15 | 15 |
OS = $(shell uname -s) |
... | ... |
@@ -60,7 +60,7 @@ ARCH = $(shell uname -m |sed -e s/i.86/i386/ -e s/sun4u/sparc64/ ) |
60 | 60 |
DEFS+= -DNAME='"$(NAME)"' -DVERSION='"$(RELEASE)"' -DARCH='"$(ARCH)"' \ |
61 | 61 |
-DOS='"$(OS)"' -DCOMPILER='"$(CC_VER)"'\ |
62 | 62 |
-DDNS_IP_HACK -DPKG_MALLOC -DSHM_MEM -DSHM_MMAP \ |
63 |
- -DUSE_SYNONIM #-DF_MALLOC \ |
|
63 |
+ -DUSE_SYNONIM -DF_MALLOC \ |
|
64 | 64 |
#-DEXTRA_DEBUG |
65 | 65 |
#-DVQ_MALLOC -DDBG_LOCK #-DSTATS |
66 | 66 |
#-DDBG_QM_MALLOC #-DNO_DEBUG |
... | ... |
@@ -73,11 +73,11 @@ DEFS+= -DNAME='"$(NAME)"' -DVERSION='"$(RELEASE)"' -DARCH='"$(ARCH)"' \ |
73 | 73 |
|
74 | 74 |
# arh. specific definitions |
75 | 75 |
ifeq ($(ARCH), i386) |
76 |
-# DEFS+= -DFAST_LOCK |
|
76 |
+ DEFS+= -DFAST_LOCK |
|
77 | 77 |
endif |
78 | 78 |
|
79 | 79 |
ifeq ($(ARCH), sparc64) |
80 |
-# DEFS+= -DFAST_LOCK |
|
80 |
+ DEFS+= -DFAST_LOCK |
|
81 | 81 |
endif |
82 | 82 |
|
83 | 83 |
|
... | ... |
@@ -94,7 +94,7 @@ static char flags[]= |
94 | 94 |
static char help_msg[]= "\ |
95 | 95 |
Usage: " NAME " -l address [-l address] [options]\n\ |
96 | 96 |
Options:\n\ |
97 |
- -c Perform loop checks and compute branches\n\ |
|
97 |
+ -c Perform loop checks and compute branches\n\ |
|
98 | 98 |
-f file Configuration file (default " CFG_FILE ")\n\ |
99 | 99 |
-p port Listen on the specified port (default: 5060)\n\ |
100 | 100 |
-l address Listen on the specified address (multiple -l mean\n\ |
... | ... |
@@ -257,11 +257,10 @@ void fm_status(struct fm_block* qm) |
257 | 257 |
qm->used, qm->real_used, qm->size-qm->real_used); |
258 | 258 |
LOG(L_INFO, " max used (+overhead)= %d\n", qm->max_real_used); |
259 | 259 |
#endif |
260 |
- |
|
260 |
+ /* |
|
261 | 261 |
LOG(L_INFO, "dumping all fragments:\n"); |
262 | 262 |
for (f=qm->first_frag, i=0;((char*)f<(char*)qm->last_frag) && (i<10); |
263 |
- f=FRAG_NEXT(f) |
|
264 |
- ,i++){ |
|
263 |
+ f=FRAG_NEXT(f), i++){ |
|
265 | 264 |
LOG(L_INFO, " %3d. %c address=%x size=%d\n", i, |
266 | 265 |
(f->u.reserved)?'a':'N', |
267 | 266 |
(char*)f+sizeof(struct fm_frag), f->size); |
... | ... |
@@ -270,10 +269,14 @@ void fm_status(struct fm_block* qm) |
270 | 269 |
(f->u.is_free)?"freed":"alloc'd", f->file, f->func, f->line); |
271 | 270 |
#endif |
272 | 271 |
} |
272 |
+*/ |
|
273 | 273 |
LOG(L_INFO, "dumping free list:\n"); |
274 | 274 |
for(h=0,i=0;h<F_HASH_SIZE;h++){ |
275 | 275 |
|
276 |
- for (f=qm->free_hash[h],j=0; f; f=f->u.nxt_free, i++, j++){ |
|
276 |
+ for (f=qm->free_hash[h],j=0; f; f=f->u.nxt_free, i++, j++) |
|
277 |
+ if (j) LOG(L_INFO, "hash= %3d. fragments no.: %5d\n", h, j); |
|
278 |
+ /* |
|
279 |
+ { |
|
277 | 280 |
LOG(L_INFO, " %5d.[%3d:%3d] %c address=%x size=%d(%x)\n", |
278 | 281 |
i, h, j, |
279 | 282 |
(f->u.reserved)?'a':'N', |
... | ... |
@@ -283,7 +286,9 @@ void fm_status(struct fm_block* qm) |
283 | 286 |
(f->u.reserved)?"freed":"alloc'd", f->file, f->func, f->line); |
284 | 287 |
#endif |
285 | 288 |
} |
289 |
+ */ |
|
286 | 290 |
} |
291 |
+ LOG(L_INFO, " Total: %6d fragments\n", i); |
|
287 | 292 |
LOG(L_INFO, "-----------------------------\n"); |
288 | 293 |
} |
289 | 294 |
|
... | ... |
@@ -417,7 +417,7 @@ void qm_status(struct qm_block* qm) |
417 | 417 |
|
418 | 418 |
for (f=qm->free_hash[h].head.u.nxt_free,j=0; |
419 | 419 |
f!=&(qm->free_hash[h].head); f=f->u.nxt_free, i++, j++); |
420 |
- if (j) LOG(L_INFO, "hash= %3d. fragments no.: %5d\n", h, j); |
|
420 |
+ if (j) LOG(L_INFO, "hash= %3d. fragments no.: %5d\n", h, j); |
|
421 | 421 |
} |
422 | 422 |
LOG(L_INFO, "-----------------------------\n"); |
423 | 423 |
} |
... | ... |
@@ -39,7 +39,6 @@ struct sip_msg* sip_msg_cloner( struct sip_msg *org_msg ) |
39 | 39 |
struct lump *lump_chain, *lump_tmp, **lump_anchor, **lump_anchor2; |
40 | 40 |
struct lump_rpl *rpl_lump, **rpl_lump_anchor; |
41 | 41 |
char *p,*foo; |
42 |
- int k1=0,k2=0,k3=0,k4=0,k5=0,k6=0; |
|
43 | 42 |
|
44 | 43 |
|
45 | 44 |
/*computing the length of entire sip_msg structure*/ |
... | ... |
@@ -83,17 +82,17 @@ struct sip_msg* sip_msg_cloner( struct sip_msg *org_msg ) |
83 | 82 |
else |
84 | 83 |
lump_chain = org_msg->repl_add_rm; |
85 | 84 |
while (lump_chain) |
86 |
- { k1++; |
|
85 |
+ { |
|
87 | 86 |
len += lump_len( lump_chain ); |
88 | 87 |
lump_tmp = lump_chain->before; |
89 | 88 |
while ( lump_tmp ) |
90 |
- { k2++; |
|
89 |
+ { |
|
91 | 90 |
len += lump_len( lump_tmp ); |
92 | 91 |
lump_tmp = lump_tmp->before; |
93 | 92 |
} |
94 | 93 |
lump_tmp = lump_chain->after; |
95 | 94 |
while ( lump_tmp ) |
96 |
- { k3++; |
|
95 |
+ { |
|
97 | 96 |
len += lump_len( lump_tmp ); |
98 | 97 |
lump_tmp = lump_tmp->after; |
99 | 98 |
} |
... | ... |
@@ -271,13 +270,13 @@ struct sip_msg* sip_msg_cloner( struct sip_msg *org_msg ) |
271 | 270 |
lump_anchor = &(new_msg->repl_add_rm); |
272 | 271 |
} |
273 | 272 |
while (lump_chain) |
274 |
- { k4++; |
|
273 |
+ { |
|
275 | 274 |
lump_clone( (*lump_anchor) , lump_chain , p ); |
276 | 275 |
/*before list*/ |
277 | 276 |
lump_tmp = lump_chain->before; |
278 | 277 |
lump_anchor2 = &((*lump_anchor)->before); |
279 | 278 |
while ( lump_tmp ) |
280 |
- { k5++; |
|
279 |
+ { |
|
281 | 280 |
lump_clone( (*lump_anchor2) , lump_tmp , p ); |
282 | 281 |
lump_anchor2 = &((*lump_anchor2)->before); |
283 | 282 |
lump_tmp = lump_tmp->before; |
... | ... |
@@ -286,7 +285,7 @@ struct sip_msg* sip_msg_cloner( struct sip_msg *org_msg ) |
286 | 285 |
lump_tmp = lump_chain->after; |
287 | 286 |
lump_anchor2 = &((*lump_anchor)->after); |
288 | 287 |
while ( lump_tmp ) |
289 |
- { k6++; |
|
288 |
+ { |
|
290 | 289 |
lump_clone( (*lump_anchor2) , lump_tmp , p ); |
291 | 290 |
lump_anchor2 = &((*lump_anchor2)->after); |
292 | 291 |
lump_tmp = lump_tmp->after; |
... | ... |
@@ -308,8 +307,6 @@ struct sip_msg* sip_msg_cloner( struct sip_msg *org_msg ) |
308 | 307 |
(*rpl_lump_anchor)->next=0; |
309 | 308 |
rpl_lump_anchor = &((*rpl_lump_anchor)->next); |
310 | 309 |
} |
311 |
- DBG("DEBUG:cloner ( %d < %d,%d> ) --- ( %d < %d , %d > )\n", |
|
312 |
- k1,k2,k3,k4,k5,k6); |
|
313 | 310 |
DBG("DEBUG:cloner --------<%d>---------<%d>-------------\n",len,p-foo); |
314 | 311 |
return new_msg; |
315 | 312 |
} |
... | ... |
@@ -254,19 +254,18 @@ char* get_hdr_field(char* buf, char* end, struct hdr_field* hdr) |
254 | 254 |
goto error; |
255 | 255 |
} |
256 | 256 |
memset(to_b, 0, sizeof(struct to_body)); |
257 |
- /* |
|
258 | 257 |
hdr->body.s=tmp; |
259 | 258 |
tmp=parse_to(tmp, end,to_b); |
260 | 259 |
if (to_b->error==PARSE_ERROR){ |
261 | 260 |
LOG(L_ERR, "ERROR: get_hdr_field: bad to header\n"); |
262 | 261 |
pkg_free(to_b); |
263 | 262 |
goto error; |
264 |
- }*/ |
|
265 |
- hdr->parsed=to_b;/* |
|
263 |
+ } |
|
264 |
+ hdr->parsed=to_b; |
|
266 | 265 |
hdr->body.len=tmp-hdr->body.s; |
267 | 266 |
DBG("get_hdr_field: to <%s>: <%s>=[%d] <%c> [%d]\n", |
268 | 267 |
hdr->name.s, to_b->body.s,to_b->body.len,*tmp,hdr->body.len); |
269 |
- break;*/ |
|
268 |
+ break; |
|
270 | 269 |
case HDR_FROM: |
271 | 270 |
case HDR_CALLID: |
272 | 271 |
case HDR_CONTACT: |