[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha8-999-g95c3d3b

Stefan Metzmacher metze at samba.org
Sat Aug 15 02:55:47 MDT 2009


The branch, master has been updated
       via  95c3d3b5d8fdc05f20c826a48312f1230f036029 (commit)
       via  a3cdd7949c221a15777994c7f2c535e7d956216e (commit)
       via  e2845b808997787701e54d2602c0ef08f9c4cff7 (commit)
      from  a023b6c64b4e1516c2506f028b0e653028970de3 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 95c3d3b5d8fdc05f20c826a48312f1230f036029
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Aug 15 09:45:39 2009 +0200

    tevent: add some more doxygen comments for tevent_req functions
    
    metze

commit a3cdd7949c221a15777994c7f2c535e7d956216e
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Aug 12 20:39:11 2009 +0200

    s3:Makefile: build ../libcli/smb/smb2_create_blob.o as part of smbd
    
    metze

commit e2845b808997787701e54d2602c0ef08f9c4cff7
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Aug 12 20:38:45 2009 +0200

    libcli/smb: add smb2_create_blob_find()
    
    metze

-----------------------------------------------------------------------

Summary of changes:
 lib/tevent/tevent_req.c       |   38 ++++++++++++++++++++++++++++++++++++++
 libcli/smb/smb2_create_blob.c |   17 +++++++++++++++++
 libcli/smb/smb2_create_blob.h |    6 ++++++
 source3/Makefile.in           |    1 +
 4 files changed, 62 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/tevent/tevent_req.c b/lib/tevent/tevent_req.c
index 0feabb5..c6b1160 100644
--- a/lib/tevent/tevent_req.c
+++ b/lib/tevent/tevent_req.c
@@ -256,6 +256,16 @@ struct tevent_req *tevent_req_post(struct tevent_req *req,
 	return req;
 }
 
+/**
+ * @brief This function destroys the attached private data
+ * @param[in] req	The request to poll
+ * @retval		The boolean form of "is in progress".
+ *
+ * This function can be used to ask if the given request
+ * is still in progress.
+ *
+ * This function is typically used by sync wrapper functions.
+ */
 bool tevent_req_is_in_progress(struct tevent_req *req)
 {
 	if (req->internal.state == TEVENT_REQ_IN_PROGRESS) {
@@ -283,6 +293,23 @@ void tevent_req_received(struct tevent_req *req)
 	req->internal.state = TEVENT_REQ_RECEIVED;
 }
 
+/**
+ * @brief This function destroys the attached private data
+ * @param[in] req	The request to poll
+ * @param[in] ev	The tevent_context to be used
+ * @retval		If a critical error has happened in the
+ * 			tevent loop layer false is returned.
+ * 			Otherwise true is returned.
+ * 			This is not the return value of the given request!
+ *
+ * This function can be used to actively poll for the
+ * given request to finish.
+ *
+ * Note: this should only be used if the given tevent context
+ *       was created by the caller, to avoid event loop nesting.
+ *
+ * This function is typically used by sync wrapper functions.
+ */
 bool tevent_req_poll(struct tevent_req *req,
 		     struct tevent_context *ev)
 {
@@ -356,6 +383,17 @@ void *_tevent_req_data(struct tevent_req *req)
 	return req->data;
 }
 
+/**
+ * @brief This function sets a print function for the given request
+ * @param[in] req	The given request
+ * @param[in] fn	A pointer to the print function
+ *
+ * This function can be used to setup a print function for the given request.
+ * This will be triggered if the tevent_req_print() function was
+ * called on the given request.
+ *
+ * Note: this function should only be used for debugging.
+ */
 void tevent_req_set_print_fn(struct tevent_req *req, tevent_req_print_fn fn)
 {
 	req->private_print = fn;
diff --git a/libcli/smb/smb2_create_blob.c b/libcli/smb/smb2_create_blob.c
index 0dad224..444dc84 100644
--- a/libcli/smb/smb2_create_blob.c
+++ b/libcli/smb/smb2_create_blob.c
@@ -184,3 +184,20 @@ NTSTATUS smb2_create_blob_add(TALLOC_CTX *mem_ctx, struct smb2_create_blobs *b,
 
 	return NT_STATUS_OK;
 }
+
+/*
+ * return the first blob with the given tag
+ */
+struct smb2_create_blob *smb2_create_blob_find(const struct smb2_create_blobs *b,
+					       const char *tag)
+{
+	uint32_t i;
+
+	for (i=0; i < b->num_blobs; i++) {
+		if (strcmp(b->blobs[i].tag, tag) == 0) {
+			return &b->blobs[i];
+		}
+	}
+
+	return NULL;
+}
diff --git a/libcli/smb/smb2_create_blob.h b/libcli/smb/smb2_create_blob.h
index e8b8f12..008befe 100644
--- a/libcli/smb/smb2_create_blob.h
+++ b/libcli/smb/smb2_create_blob.h
@@ -48,4 +48,10 @@ NTSTATUS smb2_create_blob_push(TALLOC_CTX *mem_ctx, DATA_BLOB *buffer,
 NTSTATUS smb2_create_blob_add(TALLOC_CTX *mem_ctx, struct smb2_create_blobs *b,
 			      const char *tag, DATA_BLOB data);
 
+/*
+ * return the first blob with the given tag
+ */
+struct smb2_create_blob *smb2_create_blob_find(const struct smb2_create_blobs *b,
+					       const char *tag);
+
 #endif /* _LIBCLI_SMB_SMB2_CREATE_BLOB_H_ */
diff --git a/source3/Makefile.in b/source3/Makefile.in
index 650e208..c2cd8ca 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -782,6 +782,7 @@ SMBD_OBJ_SRV = smbd/files.o smbd/chgpasswd.o smbd/connection.o \
 	       smbd/smb2_getinfo.o \
 	       smbd/smb2_setinfo.o \
 	       smbd/smb2_break.o \
+	       ../libcli/smb/smb2_create_blob.o \
 	       $(MANGLE_OBJ) @VFS_STATIC@
 
 SMBD_OBJ_BASE = $(PARAM_WITHOUT_REG_OBJ) $(SMBD_OBJ_SRV) $(LIBSMB_OBJ) \


-- 
Samba Shared Repository


More information about the samba-cvs mailing list