svn commit: samba r6980 - in branches/SAMBA_4_0/source/lib: .
tridge at samba.org
tridge at samba.org
Thu May 26 01:01:00 GMT 2005
Author: tridge
Date: 2005-05-26 01:00:58 +0000 (Thu, 26 May 2005)
New Revision: 6980
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=6980
Log:
added data_blob_append(), which I use in the web server
Modified:
branches/SAMBA_4_0/source/lib/data_blob.c
Changeset:
Modified: branches/SAMBA_4_0/source/lib/data_blob.c
===================================================================
--- branches/SAMBA_4_0/source/lib/data_blob.c 2005-05-25 20:31:46 UTC (rev 6979)
+++ branches/SAMBA_4_0/source/lib/data_blob.c 2005-05-26 01:00:58 UTC (rev 6980)
@@ -180,3 +180,16 @@
blob.length = length;
return blob;
}
+
+
+/*
+ append some data to a data blob
+*/
+NTSTATUS data_blob_append(TALLOC_CTX *mem_ctx, DATA_BLOB *blob, void *p, size_t length)
+{
+ blob->data = talloc_realloc_size(mem_ctx, blob->data, blob->length + length);
+ NT_STATUS_HAVE_NO_MEMORY(blob->data);
+ memcpy(blob->data + blob->length, p, length);
+ blob->length += length;
+ return NT_STATUS_OK;
+}
More information about the samba-cvs
mailing list