[SCM] Samba Shared Repository - branch master updated
Günther Deschner
gd at samba.org
Tue Feb 15 16:03:01 MST 2011
The branch, master has been updated
via e34ba44 s3-librpc: move server_id marshalling to own helper file.
from ab85362 s3: Support "codePage" in pdb_ads
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit e34ba447ec8a54db744f0103d91ec05f7cfd60ce
Author: Günther Deschner <gd at samba.org>
Date: Tue Feb 15 17:37:03 2011 +0100
s3-librpc: move server_id marshalling to own helper file.
(in preparation of merging struct server_id).
Guenther
Autobuild-User: Günther Deschner <gd at samba.org>
Autobuild-Date: Wed Feb 16 00:02:33 CET 2011 on sn-devel-104
-----------------------------------------------------------------------
Summary of changes:
source3/Makefile.in | 1 +
source3/librpc/idl/messaging.idl | 2 +-
source3/librpc/idl/notify.idl | 2 +-
source3/librpc/ndr/{util.c => ndr_server_id.c} | 16 +++------
source3/librpc/ndr/{util.h => ndr_server_id.h} | 3 +-
source3/librpc/ndr/util.c | 43 ------------------------
source3/librpc/ndr/util.h | 3 --
source3/librpc/wscript_build | 9 ++++-
8 files changed, 16 insertions(+), 63 deletions(-)
copy source3/librpc/ndr/{util.c => ndr_server_id.c} (87%)
copy source3/librpc/ndr/{util.h => ndr_server_id.h} (62%)
Changeset truncated at 500 lines:
diff --git a/source3/Makefile.in b/source3/Makefile.in
index b632d5d..7dbb012 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -318,6 +318,7 @@ LIBNDR_OBJ = ../librpc/ndr/ndr_basic.o \
../librpc/ndr/ndr_string.o \
../librpc/ndr/uuid.o \
librpc/ndr/util.o \
+ librpc/ndr/ndr_server_id.o \
librpc/gen_ndr/ndr_dcerpc.o
LIBNDR_GEN_OBJ0 = librpc/gen_ndr/ndr_samr.o \
diff --git a/source3/librpc/idl/messaging.idl b/source3/librpc/idl/messaging.idl
index 22c3429..0ac7220 100644
--- a/source3/librpc/idl/messaging.idl
+++ b/source3/librpc/idl/messaging.idl
@@ -5,7 +5,7 @@
*/
[
- helper("../librpc/ndr/util.h"),
+ helper("../librpc/ndr/ndr_server_id.h"),
pointer_default(unique)
]
interface messaging
diff --git a/source3/librpc/idl/notify.idl b/source3/librpc/idl/notify.idl
index 592af19..d65e8c5 100644
--- a/source3/librpc/idl/notify.idl
+++ b/source3/librpc/idl/notify.idl
@@ -10,7 +10,7 @@ import "file_id.idl";
*/
[
- helper("../librpc/ndr/util.h"),
+ helper("../librpc/ndr/ndr_server_id.h"),
pointer_default(unique)
]
interface notify
diff --git a/source3/librpc/ndr/util.c b/source3/librpc/ndr/ndr_server_id.c
similarity index 87%
copy from source3/librpc/ndr/util.c
copy to source3/librpc/ndr/ndr_server_id.c
index d4e06df..a6152d7 100644
--- a/source3/librpc/ndr/util.c
+++ b/source3/librpc/ndr/ndr_server_id.c
@@ -1,26 +1,26 @@
-/*
+/*
Unix SMB/CIFS implementation.
libndr interface
Copyright (C) Andrew Tridgell 2003
-
+
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "includes.h"
-#include "librpc/ndr/util.h"
+#include "librpc/ndr/ndr_server_id.h"
enum ndr_err_code ndr_push_server_id(struct ndr_push *ndr, int ndr_flags, const struct server_id *r)
{
@@ -64,9 +64,3 @@ void ndr_print_server_id(struct ndr_print *ndr, const char *name, const struct s
#endif
ndr->depth--;
}
-
-_PUBLIC_ void ndr_print_sockaddr_storage(struct ndr_print *ndr, const char *name, const struct sockaddr_storage *ss)
-{
- char addr[INET6_ADDRSTRLEN];
- ndr->print(ndr, "%-25s: %s", name, print_sockaddr(addr, sizeof(addr), ss));
-}
diff --git a/source3/librpc/ndr/util.h b/source3/librpc/ndr/ndr_server_id.h
similarity index 62%
copy from source3/librpc/ndr/util.h
copy to source3/librpc/ndr/ndr_server_id.h
index 3f7be6b..5975abc 100644
--- a/source3/librpc/ndr/util.h
+++ b/source3/librpc/ndr/ndr_server_id.h
@@ -1,7 +1,6 @@
-/* The following definitions come from librpc/ndr/util.c */
+/* The following definitions come from librpc/ndr/ndr_server_id.c */
enum ndr_err_code ndr_push_server_id(struct ndr_push *ndr, int ndr_flags, const struct server_id *r);
enum ndr_err_code ndr_pull_server_id(struct ndr_pull *ndr, int ndr_flags, struct server_id *r);
void ndr_print_server_id(struct ndr_print *ndr, const char *name, const struct server_id *r);
-_PUBLIC_ void ndr_print_sockaddr_storage(struct ndr_print *ndr, const char *name, const struct sockaddr_storage *ss);
diff --git a/source3/librpc/ndr/util.c b/source3/librpc/ndr/util.c
index d4e06df..a026ecc 100644
--- a/source3/librpc/ndr/util.c
+++ b/source3/librpc/ndr/util.c
@@ -22,49 +22,6 @@
#include "includes.h"
#include "librpc/ndr/util.h"
-enum ndr_err_code ndr_push_server_id(struct ndr_push *ndr, int ndr_flags, const struct server_id *r)
-{
- if (ndr_flags & NDR_SCALARS) {
- NDR_CHECK(ndr_push_align(ndr, 4));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS,
- (uint32_t)r->pid));
-#ifdef CLUSTER_SUPPORT
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS,
- (uint32_t)r->vnn));
-#endif
- }
- if (ndr_flags & NDR_BUFFERS) {
- }
- return NDR_ERR_SUCCESS;
-}
-
-enum ndr_err_code ndr_pull_server_id(struct ndr_pull *ndr, int ndr_flags, struct server_id *r)
-{
- if (ndr_flags & NDR_SCALARS) {
- uint32_t pid;
- NDR_CHECK(ndr_pull_align(ndr, 4));
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &pid));
-#ifdef CLUSTER_SUPPORT
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->vnn));
-#endif
- r->pid = (pid_t)pid;
- }
- if (ndr_flags & NDR_BUFFERS) {
- }
- return NDR_ERR_SUCCESS;
-}
-
-void ndr_print_server_id(struct ndr_print *ndr, const char *name, const struct server_id *r)
-{
- ndr_print_struct(ndr, name, "server_id");
- ndr->depth++;
- ndr_print_uint32(ndr, "id", (uint32_t)r->pid);
-#ifdef CLUSTER_SUPPORT
- ndr_print_uint32(ndr, "vnn", (uint32_t)r->vnn);
-#endif
- ndr->depth--;
-}
-
_PUBLIC_ void ndr_print_sockaddr_storage(struct ndr_print *ndr, const char *name, const struct sockaddr_storage *ss)
{
char addr[INET6_ADDRSTRLEN];
diff --git a/source3/librpc/ndr/util.h b/source3/librpc/ndr/util.h
index 3f7be6b..3bf9c0e 100644
--- a/source3/librpc/ndr/util.h
+++ b/source3/librpc/ndr/util.h
@@ -1,7 +1,4 @@
/* The following definitions come from librpc/ndr/util.c */
-enum ndr_err_code ndr_push_server_id(struct ndr_push *ndr, int ndr_flags, const struct server_id *r);
-enum ndr_err_code ndr_pull_server_id(struct ndr_pull *ndr, int ndr_flags, struct server_id *r);
-void ndr_print_server_id(struct ndr_print *ndr, const char *name, const struct server_id *r);
_PUBLIC_ void ndr_print_sockaddr_storage(struct ndr_print *ndr, const char *name, const struct sockaddr_storage *ss);
diff --git a/source3/librpc/wscript_build b/source3/librpc/wscript_build
index ae43531..a07d4bc 100644
--- a/source3/librpc/wscript_build
+++ b/source3/librpc/wscript_build
@@ -10,14 +10,19 @@ bld.SAMBA_SUBSYSTEM('NDR_LIBNET_JOIN',
public_deps='ndr'
)
+bld.SAMBA_SUBSYSTEM('NDR_SERVER_ID',
+ source='ndr/ndr_server_id.c',
+ public_deps='ndr'
+ )
+
bld.SAMBA_SUBSYSTEM('NDR_MESSAGING',
source='gen_ndr/ndr_messaging.c',
- public_deps='ndr'
+ public_deps='ndr NDR_SERVER_ID'
)
bld.SAMBA_SUBSYSTEM('NDR_NOTIFY',
source='gen_ndr/ndr_notify.c',
- public_deps='ndr NDR_FILE_ID'
+ public_deps='ndr NDR_FILE_ID NDR_SERVER_ID'
)
bld.SAMBA_SUBSYSTEM('NDR_SECRETS',
--
Samba Shared Repository
More information about the samba-cvs
mailing list