Browse code

- upped version no - changed all the ROUND* macros

Andrei Pelinescu-Onciul authored on 20/02/2002 21:07:31
Showing 6 changed files
... ...
@@ -8,7 +8,7 @@
8 8
 VERSION = 0
9 9
 PATCHLEVEL = 8
10 10
 SUBLEVEL = 6
11
-EXTRAVERSION = -6x
11
+EXTRAVERSION = -6-beer
12 12
 
13 13
 RELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
14 14
 OS = $(shell uname -s)
... ...
@@ -2,6 +2,7 @@ $Id$
2 2
 
3 3
 ( - todo, x - done)
4 4
 
5
+- replace  remaining mallocs/frees at least in msg_translator.c
5 6
 - add $(INCLUDES) to the Makefiles
6 7
 - make ser suncc ready
7 8
 - fix parse_cseq!!! (it doesnt parse 1234\n INVITE a.s.o)
... ...
@@ -16,8 +16,15 @@
16 16
 #define FRAG_OVERHEAD	(sizeof(struct fm_frag))
17 17
 
18 18
 
19
-#define ROUNDUP(s)		(((s)%ROUNDTO)?((s)+ROUNDTO)/ROUNDTO*ROUNDTO:(s))
20
-#define ROUNDDOWN(s)	(((s)%ROUNDTO)?((s)-ROUNDTO)/ROUNDTO*ROUNDTO:(s))
19
+/* ROUNDTO= 2^k so the following works */
20
+#define ROUNDTO_MASK	(~((unsigned long)ROUNDTO-1))
21
+#define ROUNDUP(s)		(((s)+(ROUNDTO-1))&ROUNDTO_MASK)
22
+#define ROUNDDOWN(s)	((s)&ROUNDTO_MASK)
23
+
24
+/*
25
+ #define ROUNDUP(s)		(((s)%ROUNDTO)?((s)+ROUNDTO)/ROUNDTO*ROUNDTO:(s))
26
+ #define ROUNDDOWN(s)	(((s)%ROUNDTO)?((s)-ROUNDTO)/ROUNDTO*ROUNDTO:(s))
27
+*/
21 28
 
22 29
 
23 30
 
... ...
@@ -30,8 +30,14 @@
30 30
 #define FRAG_OVERHEAD	(sizeof(struct qm_frag)+sizeof(struct qm_frag_end))
31 31
 
32 32
 
33
+#define ROUNDTO_MASK	(~((unsigned long)ROUNDTO-1))
34
+#define ROUNDUP(s)		(((s)+(ROUNDTO-1))&ROUNDTO_MASK)
35
+#define ROUNDDOWN(s)	((s)&ROUNDTO_MASK)
36
+
37
+/*
33 38
 #define ROUNDUP(s)		(((s)%ROUNDTO)?((s)+ROUNDTO)/ROUNDTO*ROUNDTO:(s))
34 39
 #define ROUNDDOWN(s)	(((s)%ROUNDTO)?((s)-ROUNDTO)/ROUNDTO*ROUNDTO:(s))
40
+*/
35 41
 
36 42
 
37 43
 
... ...
@@ -11,7 +11,10 @@
11 11
 #include "../../ut.h"
12 12
 
13 13
 
14
-#define ROUND4(s) (((s)%4)?((s)+4)/4*4:(s))
14
+/*#define ROUND4(s) (((s)%4)?((s)+4)/4*4:(s))*/
15
+
16
+#define ROUND4(s)		(((s)+3)&(~(3UL)))
17
+
15 18
 
16 19
 #define  lump_len( _lump)  (ROUND4(sizeof(struct lump)) + \
17 20
                ROUND4( ((_lump)->op==LUMP_ADD)?(_lump)->len:0 ))
... ...
@@ -21,8 +21,8 @@ dns=on           # (cmd. line: -r)
21 21
 rev_dns=yes      # (cmd. line: -R)
22 22
 #port=5070
23 23
 #listen=127.0.0.1
24
-listen=192.168.57.33
25
-#listen=10.0.0.179
24
+#listen=192.168.57.33
25
+listen=10.0.0.179
26 26
 loop_checks=0
27 27
 # for more info: sip_router -h
28 28