diff options
author | Jim McDonough <jmcd@samba.org> | 2003-10-30 16:38:39 +0000 |
---|---|---|
committer | Jim McDonough <jmcd@samba.org> | 2003-10-30 16:38:39 +0000 |
commit | 523444b7b69fd14798a70cbf98b4f5f0177bfd2a (patch) | |
tree | 66f9e9607d09c56516366e1c0c88a46f49247822 /source3/rpc_server | |
parent | 11e6f4b5185f6d3ee4e8c91cf598839a7f1d5002 (diff) | |
download | samba-523444b7b69fd14798a70cbf98b4f5f0177bfd2a.tar.gz samba-523444b7b69fd14798a70cbf98b4f5f0177bfd2a.tar.bz2 samba-523444b7b69fd14798a70cbf98b4f5f0177bfd2a.zip |
First round of merging various UUID structures.
This eliminates RPC_UUID. It creates the following struct:
struct uuid
{
uint32 time_low;
uint16 time_mid;
uint16 time_hi_and_version;
uint8 clock_seq[2];
uint8 node[6];
};
which replaces RPC_UUID and various random struct uuid definitions
and a flat version:
#define UUID_FLAT_SIZE 16
typedef struct uuid_flat
{
uint8 info[UUID_FLAT_SIZE];
} UUID_FLAT;
which pretty much looks like GUID (which I will start eliminating).
I want us to use the FLAT one only on the wire (perhaps in files, too?), and
I want it to be obvious to the coder that it is the FLAT version.
This leaves a couple of compiler warnings, where GUID isn't completely
replaced by FLAT_UUID yet...I'll get to those soon.
(This used to be commit 1532b5d2e3c61df232b16394acedf6eac387588b)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r-- | source3/rpc_server/srv_epmapper_nt.c | 2 | ||||
-rw-r--r-- | source3/rpc_server/srv_pipe.c | 4 | ||||
-rw-r--r-- | source3/rpc_server/srv_spoolss_nt.c | 5 |
3 files changed, 6 insertions, 5 deletions
diff --git a/source3/rpc_server/srv_epmapper_nt.c b/source3/rpc_server/srv_epmapper_nt.c index 1b72a5ed41..e82484af4a 100644 --- a/source3/rpc_server/srv_epmapper_nt.c +++ b/source3/rpc_server/srv_epmapper_nt.c @@ -43,7 +43,7 @@ void _epm_map(pipes_struct *ps, const EPM_Q_MAP *q_u, EPM_R_MAP *r_u) switch (q_u->tower->floors[i].lhs.protocol) { case EPM_FLOOR_UUID: init_epm_floor_uuid(&floors[i], - &q_u->tower->floors[i]. + q_u->tower->floors[i]. lhs.uuid.uuid, q_u->tower->floors[i]. lhs.uuid.version); diff --git a/source3/rpc_server/srv_pipe.c b/source3/rpc_server/srv_pipe.c index 444c35987a..7bbe726f5a 100644 --- a/source3/rpc_server/srv_pipe.c +++ b/source3/rpc_server/srv_pipe.c @@ -731,9 +731,9 @@ BOOL check_bind_req(struct pipes_struct *p, RPC_IFACE* abstract, { if ( strequal(pipe_names[i].client_pipe, pname) && (abstract->version == pipe_names[i].abstr_syntax.version) - && (memcmp(&abstract->uuid, &pipe_names[i].abstr_syntax.uuid, sizeof(RPC_UUID)) == 0) + && (memcmp(&abstract->uuid, &pipe_names[i].abstr_syntax.uuid, sizeof(struct uuid)) == 0) && (transfer->version == pipe_names[i].trans_syntax.version) - && (memcmp(&transfer->uuid, &pipe_names[i].trans_syntax.uuid, sizeof(RPC_UUID)) == 0) ) + && (memcmp(&transfer->uuid, &pipe_names[i].trans_syntax.uuid, sizeof(struct uuid)) == 0) ) { struct api_struct *fns = NULL; int n_fns = 0; diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index 15578f6148..ad8f5af432 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -4358,10 +4358,11 @@ static BOOL construct_printer_info_5(Printer_entry *print_hnd, PRINTER_INFO_5 *p static BOOL construct_printer_info_7(Printer_entry *print_hnd, PRINTER_INFO_7 *printer, int snum) { char *guid_str = NULL; - GUID guid; + UUID_FLAT guid; if (is_printer_published(print_hnd, snum, &guid)) { - asprintf(&guid_str, "{%s}", smb_uuid_string_static(guid)); + asprintf(&guid_str, "{%s}", + smb_uuid_string_static(smb_uuid_unpack_static(guid))); strupper_m(guid_str); init_unistr(&printer->guid, guid_str); printer->action = SPOOL_DS_PUBLISH; |