Author: tpot
Date: 2005-08-09 03:09:47 +0000 (Tue, 09 Aug 2005)
New Revision: 9222

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=9222

Log:
Rename smb_tree_connect() to smb_raw_tcon() to match other raw function 
names.

Modified:
   branches/SAMBA_4_0/source/libcli/cliconnect.c
   branches/SAMBA_4_0/source/libcli/composite/connect.c
   branches/SAMBA_4_0/source/libcli/raw/clitree.c
   branches/SAMBA_4_0/source/libcli/util/clilsa.c
   branches/SAMBA_4_0/source/torture/raw/context.c
   branches/SAMBA_4_0/source/torture/rpc/eventlog.c
   branches/SAMBA_4_0/source/torture/rpc/xplogin.c


Changeset:
Modified: branches/SAMBA_4_0/source/libcli/cliconnect.c
===================================================================
--- branches/SAMBA_4_0/source/libcli/cliconnect.c       2005-08-09 03:04:47 UTC 
(rev 9221)
+++ branches/SAMBA_4_0/source/libcli/cliconnect.c       2005-08-09 03:09:47 UTC 
(rev 9222)
@@ -83,7 +83,7 @@
        return status;
 }
 
-/* wrapper around smb_tree_connect() */
+/* wrapper around smb_raw_tcon() */
 NTSTATUS smbcli_tconX(struct smbcli_state *cli, const char *sharename, 
                      const char *devtype, const char *password)
 {
@@ -116,7 +116,7 @@
        tcon.tconx.in.path = sharename;
        tcon.tconx.in.device = devtype;
        
-       status = smb_tree_connect(cli->tree, mem_ctx, &tcon);
+       status = smb_raw_tcon(cli->tree, mem_ctx, &tcon);
 
        cli->tree->tid = tcon.tconx.out.tid;
 

Modified: branches/SAMBA_4_0/source/libcli/composite/connect.c
===================================================================
--- branches/SAMBA_4_0/source/libcli/composite/connect.c        2005-08-09 
03:04:47 UTC (rev 9221)
+++ branches/SAMBA_4_0/source/libcli/composite/connect.c        2005-08-09 
03:09:47 UTC (rev 9222)
@@ -77,7 +77,7 @@
        struct connect_state *state = talloc_get_type(c->private, struct 
connect_state);
        NTSTATUS status;
 
-       status = smb_tree_connect_recv(state->req, c, state->io_tcon);
+       status = smb_raw_tcon_recv(state->req, c, state->io_tcon);
        NT_STATUS_NOT_OK_RETURN(status);
 
        io->out.tree->tid = state->io_tcon->tconx.out.tid;
@@ -134,7 +134,7 @@
                state->io_tcon->tconx.in.device = io->in.service_type;
        }
 
-       state->req = smb_tree_connect_send(io->out.tree, state->io_tcon);
+       state->req = smb_raw_tcon_send(io->out.tree, state->io_tcon);
        NT_STATUS_HAVE_NO_MEMORY(state->req);
 
        state->req->async.fn = request_handler;

Modified: branches/SAMBA_4_0/source/libcli/raw/clitree.c
===================================================================
--- branches/SAMBA_4_0/source/libcli/raw/clitree.c      2005-08-09 03:04:47 UTC 
(rev 9221)
+++ branches/SAMBA_4_0/source/libcli/raw/clitree.c      2005-08-09 03:09:47 UTC 
(rev 9222)
@@ -56,8 +56,8 @@
 /****************************************************************************
  Send a tconX (async send)
 ****************************************************************************/
-struct smbcli_request *smb_tree_connect_send(struct smbcli_tree *tree, 
-                                            union smb_tcon *parms)
+struct smbcli_request *smb_raw_tcon_send(struct smbcli_tree *tree, 
+                                        union smb_tcon *parms)
 {
        struct smbcli_request *req = NULL;
 
@@ -92,8 +92,8 @@
 /****************************************************************************
  Send a tconX (async recv)
 ****************************************************************************/
-NTSTATUS smb_tree_connect_recv(struct smbcli_request *req, TALLOC_CTX 
*mem_ctx, 
-                              union smb_tcon *parms)
+NTSTATUS smb_raw_tcon_recv(struct smbcli_request *req, TALLOC_CTX *mem_ctx, 
+                          union smb_tcon *parms)
 {
        uint8_t *p;
 
@@ -134,11 +134,11 @@
 /****************************************************************************
  Send a tconX (sync interface)
 ****************************************************************************/
-NTSTATUS smb_tree_connect(struct smbcli_tree *tree, TALLOC_CTX *mem_ctx, 
-                         union smb_tcon *parms)
+NTSTATUS smb_raw_tcon(struct smbcli_tree *tree, TALLOC_CTX *mem_ctx, 
+                     union smb_tcon *parms)
 {
-       struct smbcli_request *req = smb_tree_connect_send(tree, parms);
-       return smb_tree_connect_recv(req, mem_ctx, parms);
+       struct smbcli_request *req = smb_raw_tcon_send(tree, parms);
+       return smb_raw_tcon_recv(req, mem_ctx, parms);
 }
 
 

Modified: branches/SAMBA_4_0/source/libcli/util/clilsa.c
===================================================================
--- branches/SAMBA_4_0/source/libcli/util/clilsa.c      2005-08-09 03:04:47 UTC 
(rev 9221)
+++ branches/SAMBA_4_0/source/libcli/util/clilsa.c      2005-08-09 03:09:47 UTC 
(rev 9222)
@@ -69,7 +69,7 @@
        tcon.tconx.in.password = data_blob(NULL, 0);
        tcon.tconx.in.path = "ipc$";
        tcon.tconx.in.device = "IPC";   
-       status = smb_tree_connect(lsa->ipc_tree, lsa, &tcon);
+       status = smb_raw_tcon(lsa->ipc_tree, lsa, &tcon);
        if (!NT_STATUS_IS_OK(status)) {
                talloc_free(lsa);
                return status;

Modified: branches/SAMBA_4_0/source/torture/raw/context.c
===================================================================
--- branches/SAMBA_4_0/source/torture/raw/context.c     2005-08-09 03:04:47 UTC 
(rev 9221)
+++ branches/SAMBA_4_0/source/torture/raw/context.c     2005-08-09 03:09:47 UTC 
(rev 9222)
@@ -289,7 +289,7 @@
        tcon.tconx.in.password = data_blob(NULL, 0);
        tcon.tconx.in.path = talloc_asprintf(mem_ctx, "\\\\%s\\%s", host, 
share);
        tcon.tconx.in.device = "A:";    
-       status = smb_tree_connect(tree, mem_ctx, &tcon);
+       status = smb_raw_tcon(tree, mem_ctx, &tcon);
        CHECK_STATUS(status, NT_STATUS_OK);
        
 
@@ -298,7 +298,7 @@
 
        printf("try a tconx with a bad device type\n");
        tcon.tconx.in.device = "FOO";   
-       status = smb_tree_connect(tree, mem_ctx, &tcon);
+       status = smb_raw_tcon(tree, mem_ctx, &tcon);
        CHECK_STATUS(status, NT_STATUS_BAD_DEVICE_TYPE);
 
 

Modified: branches/SAMBA_4_0/source/torture/rpc/eventlog.c
===================================================================
--- branches/SAMBA_4_0/source/torture/rpc/eventlog.c    2005-08-09 03:04:47 UTC 
(rev 9221)
+++ branches/SAMBA_4_0/source/torture/rpc/eventlog.c    2005-08-09 03:09:47 UTC 
(rev 9222)
@@ -54,41 +54,45 @@
 }
 
 static BOOL test_ReadEventLog(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, 
-                             struct policy_handle *handle, uint32_t offset)
+                             struct policy_handle *handle)
 {
        NTSTATUS status;
        struct eventlog_ReadEventLogW r;
 
        printf("\ntesting ReadEventLog\n");
 
+       r.in.offset = 0;
        r.in.handle = handle;
        r.in.flags = EVENTLOG_BACKWARDS_READ|EVENTLOG_SEQUENTIAL_READ;
-       r.in.offset = 0;
-       r.in.number_of_bytes = 0;
 
-       status = dcerpc_eventlog_ReadEventLogW(p, mem_ctx, &r);
+       while (1) {
+               r.in.number_of_bytes = 0;
+               r.out.data = NULL;
 
-       if (NT_STATUS_IS_OK(r.out.result)) {
-               /* No data */
-               return True;
-       }
+               status = dcerpc_eventlog_ReadEventLogW(p, mem_ctx, &r);
 
-       if (!NT_STATUS_EQUAL(r.out.result, NT_STATUS_BUFFER_TOO_SMALL)) {
-               printf("ReadEventLog failed - %s\n", nt_errstr(r.out.result));
-               return False;
-       }
+               if (NT_STATUS_EQUAL(r.out.result, NT_STATUS_END_OF_FILE)) {
+                       break;
+               }
 
-       r.in.number_of_bytes = r.out.real_size;
-       r.out.data = talloc_size(mem_ctx, r.in.number_of_bytes);
+               if (!NT_STATUS_EQUAL(r.out.result, NT_STATUS_BUFFER_TOO_SMALL)) 
{
+                       printf("ReadEventLog failed - %s\n", 
nt_errstr(r.out.result));
+                       return False;
+               }
+               
+               r.in.number_of_bytes = r.out.real_size;
+               r.out.data = talloc_size(mem_ctx, r.in.number_of_bytes);
 
-       status = dcerpc_eventlog_ReadEventLogW(p, mem_ctx, &r);
+               status = dcerpc_eventlog_ReadEventLogW(p, mem_ctx, &r);
 
-       if (!NT_STATUS_IS_OK(status)) {
-               printf("ReadEventLog failed - %s\n", nt_errstr(status));
-               return False;
+               if (!NT_STATUS_IS_OK(status)) {
+                       printf("ReadEventLog failed - %s\n", nt_errstr(status));
+                       return False;
+               }
+               
+               r.in.offset++;
        }
 
-
        return True;
 }
 
@@ -168,7 +172,7 @@
        unknown0.unknown1 = 0x0001;
 
        r.in.unknown0 = &unknown0;
-       init_lsa_String(&r.in.logname, "system");
+       init_lsa_String(&r.in.logname, "dns server");
        init_lsa_String(&r.in.servername, NULL);
        r.in.unknown2 = 0x00000001;
        r.in.unknown3 = 0x00000001;
@@ -221,7 +225,7 @@
        
        ret &= test_GetNumRecords(p, mem_ctx, &handle);
 
-       ret &= test_ReadEventLog(p, mem_ctx, &handle, 0);
+       ret &= test_ReadEventLog(p, mem_ctx, &handle);
 
        ret &= test_FlushEventLog(p, mem_ctx, &handle);
 

Modified: branches/SAMBA_4_0/source/torture/rpc/xplogin.c
===================================================================
--- branches/SAMBA_4_0/source/torture/rpc/xplogin.c     2005-08-09 03:04:47 UTC 
(rev 9221)
+++ branches/SAMBA_4_0/source/torture/rpc/xplogin.c     2005-08-09 03:09:47 UTC 
(rev 9222)
@@ -147,7 +147,7 @@
                                            transport->called.name);
        tcon.tconx.in.device = "IPC";
 
-       status = smb_tree_connect(tree, mem_ctx, &tcon);
+       status = smb_raw_tcon(tree, mem_ctx, &tcon);
 
        if (!NT_STATUS_IS_OK(status)) {
                talloc_free(tree);

Reply via email to