[SCM] Samba Shared Repository - branch master updated

Volker Lendecke vlendec at samba.org
Fri Aug 6 07:16:36 MDT 2010


The branch, master has been updated
       via  bf9a1dd... s3: Remove some explicit calls to procid_self()
       via  e6604e5... s3: Remove some explicit calls to procid_self()
      from  e9eb263... s3-spoolss: Make sure we convert a 4 byte value to uint32_t.

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


- Log -----------------------------------------------------------------
commit bf9a1dd4605cbf9c29e2b5bab9042b389980f1da
Author: Volker Lendecke <vl at samba.org>
Date:   Mon Jul 19 21:00:41 2010 +0200

    s3: Remove some explicit calls to procid_self()

commit e6604e5d20c4ec45787ff49d5392484ef1d2f313
Author: Volker Lendecke <vl at samba.org>
Date:   Mon Jul 19 21:04:04 2010 +0200

    s3: Remove some explicit calls to procid_self()

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

Summary of changes:
 source3/torture/msgtest.c  |    6 +++---
 source3/utils/smbcontrol.c |   17 ++++++++++-------
 2 files changed, 13 insertions(+), 10 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/torture/msgtest.c b/source3/torture/msgtest.c
index 104b171..6d1a689 100644
--- a/source3/torture/msgtest.c
+++ b/source3/torture/msgtest.c
@@ -88,10 +88,10 @@ static void pong_message(struct messaging_context *msg_ctx,
 	safe_strcpy(buf, "1234567890", sizeof(buf)-1);
 
 	for (i=0;i<n;i++) {
-		messaging_send(msg_ctx, procid_self(), MSG_PING,
+		messaging_send(msg_ctx, messaging_server_id(msg_ctx), MSG_PING,
 			       &data_blob_null);
-		messaging_send_buf(msg_ctx, procid_self(), MSG_PING,
-				   (uint8 *)buf, 11);
+		messaging_send_buf(msg_ctx, messaging_server_id(msg_ctx),
+				   MSG_PING,(uint8 *)buf, 11);
 	}
 
 	for (i=0;i<n;i++) {
diff --git a/source3/utils/smbcontrol.c b/source3/utils/smbcontrol.c
index 09f4f31..9fc8012 100644
--- a/source3/utils/smbcontrol.c
+++ b/source3/utils/smbcontrol.c
@@ -961,7 +961,7 @@ static bool do_winbind_onlinestatus(struct messaging_context *msg_ctx,
 {
 	struct server_id myid;
 
-	myid = procid_self();
+	myid = messaging_server_id(msg_ctx);
 
 	if (argc != 1) {
 		fprintf(stderr, "Usage: smbcontrol winbindd onlinestatus\n");
@@ -993,7 +993,7 @@ static bool do_dump_event_list(struct messaging_context *msg_ctx,
 {
 	struct server_id myid;
 
-	myid = procid_self();
+	myid = messaging_server_id(msg_ctx);
 
 	if (argc != 1) {
 		fprintf(stderr, "Usage: smbcontrol <dest> dump-event-list\n");
@@ -1013,7 +1013,7 @@ static bool do_winbind_dump_domain_list(struct messaging_context *msg_ctx,
 	uint8_t *buf = NULL;
 	int buf_len = 0;
 
-	myid = procid_self();
+	myid = messaging_server_id(msg_ctx);
 
 	if (argc < 1 || argc > 2) {
 		fprintf(stderr, "Usage: smbcontrol <dest> dump_domain_list "
@@ -1076,7 +1076,9 @@ static bool do_winbind_validate_cache(struct messaging_context *msg_ctx,
 				      const struct server_id pid,
 				      const int argc, const char **argv)
 {
-	struct server_id myid = procid_self();
+	struct server_id myid;
+
+	myid = messaging_server_id(msg_ctx);
 
 	if (argc != 1) {
 		fprintf(stderr, "Usage: smbcontrol winbindd validate-cache\n");
@@ -1232,7 +1234,8 @@ static void usage(poptContext pc)
 
 /* Return the pid number for a string destination */
 
-static struct server_id parse_dest(const char *dest)
+static struct server_id parse_dest(struct messaging_context *msg,
+				   const char *dest)
 {
 	struct server_id result = {-1};
 	pid_t pid;
@@ -1246,7 +1249,7 @@ static struct server_id parse_dest(const char *dest)
 	/* Try self - useful for testing */
 
 	if (strequal(dest, "self")) {
-		return procid_self();
+		return messaging_server_id(msg);
 	}
 
 	/* Fix winbind typo. */
@@ -1284,7 +1287,7 @@ static bool do_command(struct messaging_context *msg_ctx,
 
 	/* Check destination */
 
-	pid = parse_dest(dest);
+	pid = parse_dest(msg_ctx, dest);
 	if (!procid_valid(&pid)) {
 		return False;
 	}


-- 
Samba Shared Repository


More information about the samba-cvs mailing list