svn commit: samba r12961 - in trunk/source/param: .

vlendec at samba.org vlendec at samba.org
Mon Jan 16 16:29:09 GMT 2006


Author: vlendec
Date: 2006-01-16 16:29:08 +0000 (Mon, 16 Jan 2006)
New Revision: 12961

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=12961

Log:
Make the per-request loadparm talloc context available to the public. Useable
for short-term stuff.

Volker

Modified:
   trunk/source/param/loadparm.c


Changeset:
Modified: trunk/source/param/loadparm.c
===================================================================
--- trunk/source/param/loadparm.c	2006-01-16 16:28:14 UTC (rev 12960)
+++ trunk/source/param/loadparm.c	2006-01-16 16:29:08 UTC (rev 12961)
@@ -1663,6 +1663,19 @@
 	lp_talloc = NULL;
 }
 
+TALLOC_CTX *tmp_talloc_ctx(void)
+{
+	if (lp_talloc == NULL) {
+		lp_talloc = talloc_init(NULL);
+	}
+
+	if (lp_talloc == NULL) {
+		smb_panic("Could not create temporary talloc context\n");
+	}
+
+	return lp_talloc;
+}
+
 /*******************************************************************
  Convenience routine to grab string parameters into temporary memory
  and run standard_sub_basic on them. The buffers can be written to by



More information about the samba-cvs mailing list