[dovecot-cvs] dovecot/src/lib data-stack.c,1.20,1.21

cras at procontrol.fi cras at procontrol.fi
Mon May 10 04:01:27 EEST 2004


Update of /home/cvs/dovecot/src/lib
In directory talvi:/tmp/cvs-serv31049/lib

Modified Files:
	data-stack.c 
Log Message:
allow using data stack without data_stack_init().



Index: data-stack.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib/data-stack.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- data-stack.c	21 Sep 2003 17:55:36 -0000	1.20
+++ data-stack.c	10 May 2004 01:01:24 -0000	1.21
@@ -211,6 +211,11 @@
 	if (size == 0 || size > SSIZE_T_MAX)
 		i_panic("Trying to allocate %"PRIuSIZE_T" bytes", size);
 
+	if (data_stack_frame == 0) {
+		/* kludgy, but allow this before initialization */
+		data_stack_init();
+	}
+
 	/* reset t_buffer_get() mark - not really needed but makes it easier
 	   to notice if t_malloc() is called between t_buffer_get() and
 	   t_buffer_alloc() */



More information about the dovecot-cvs mailing list