Browse code

- moved malloc_init at the begining of main (Nils suggestion)

Andrei Pelinescu-Onciul authored on 27/03/2003 13:26:06
Showing 2 changed files
... ...
@@ -2,9 +2,9 @@ $Id$
2 2
 
3 3
 ( - todo, x - done)
4 4
 
5
-- replace  remaining mallocs/frees at least in msg_translator.c
5
+x replace  remaining mallocs/frees at least in msg_translator.c
6 6
 - add $(INCLUDES) to the Makefiles
7
-- make ser suncc ready
7
+x make ser suncc ready
8 8
 - fix parse_cseq!!! (it doesnt parse 1234\n INVITE a.s.o)
9 9
 x fix 0 parameter module f. call
10 10
 x better Via parsing (handle ' ' in uri, eg: foo.bar : 1234 ; received=) and
... ...
@@ -13,6 +13,7 @@ x better Via parsing (handle ' ' in uri, eg: foo.bar : 1234 ; received=) and
13 13
 - fix alignment access problems (warning on Sun)
14 14
 x (different way) add request header bitmap field for the modules
15 15
 - introduce variables & function in the script language (cfg. file)
16
+- ? variable number of params functions in script (no longer limited to 2)?
16 17
 
17 18
 
18 19
 High priority:
... ...
@@ -46,7 +47,7 @@ x add support for -u user and -g group (not only -u uid, -g uid)
46 46
 
47 47
 x handle SIGCHLD, SIGHUP
48 48
 - use a  standard lex compatible .lex format (instead of flex)
49
-- try & use native compiler & ld if possible
49
+x try & use native compiler & ld if possible
50 50
 
51 51
 x make install
52 52
 x init.d scripts (and rc.local? for *BSD or Slackware)
... ...
@@ -67,11 +68,23 @@ x freopen stdin, stdout, stderr to /dev/null
67 67
  (-DF_MALLOC, -DNO_DBG, ... sip_warning=0, a.s.o)
68 68
 - add src_port, dst_port, proto to cfg.{y,lex}
69 69
 x generic locking lib
70
-- convert tm to use new locking lib
71
-- tcp disable nagle & other socket stuff (close()?)
70
+x convert tm to use new locking lib
72 71
 - force add rport (setflag(rport)???)
73 72
 - kill all the fprintf
74 73
 
74
+optimizations:
75
+- better timer interface with hashes (a la openbsd)
76
+- atomic ops?
77
+- assembly for some very common used function
78
+- getsock* cache
79
+- fd cache for tcp_send
80
+- dns cache?
81
+
82
+
83
+tcp stuff:
84
+x tcp disable nagle 
85
+- tcp locking/atomic ops review
86
+
75 87
 tm optimizations:
76 88
 
77 89
 - replace snprintfs int build_uac_request, *_dlg
... ...
@@ -1072,6 +1072,10 @@ int main(int argc, char** argv)
1072 1072
 	ret=-1;
1073 1073
 	my_argc=argc; my_argv=argv;
1074 1074
 	
1075
+	/*init mallocs (before parsing cfg or cmd line !)*/
1076
+	if (init_mallocs()==-1)
1077
+		goto error;
1078
+
1075 1079
 	/* added by jku: add exit handler */
1076 1080
 	if (signal(SIGINT, sig_usr) == SIG_ERR ) {
1077 1081
 		DPrint("ERROR: no SIGINT signal handler can be installed\n");
... ...
@@ -1287,9 +1291,6 @@ try_again:
1287 1287
 	
1288 1288
 	
1289 1289
 
1290
-	/*init mallocs (before parsing cfg !)*/
1291
-	if (init_mallocs()==-1)
1292
-		goto error;
1293 1290
 
1294 1291
 	/*init timer, before parsing the cfg!*/
1295 1292
 	if (init_timer()<0){