s3:libsmb: Plumb cli_smb2_get_ea_list_path() inside cli_get_ea_list_path().
authorJeremy Allison <jra@samba.org>
Wed, 7 Aug 2013 23:42:02 +0000 (16:42 -0700)
committerStefan Metzmacher <metze@samba.org>
Thu, 15 Aug 2013 07:07:07 +0000 (09:07 +0200)
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source3/libsmb/clifile.c

index d186112d42fa4747f1e411692bc2bf41ba501838..424354b9638dc438962774d645d6495028ad5440 100644 (file)
@@ -4554,11 +4554,21 @@ NTSTATUS cli_get_ea_list_path(struct cli_state *cli, const char *path,
                size_t *pnum_eas,
                struct ea_struct **pea_list)
 {
-       TALLOC_CTX *frame = talloc_stackframe();
+       TALLOC_CTX *frame = NULL;
        struct tevent_context *ev = NULL;
        struct tevent_req *req = NULL;
        NTSTATUS status = NT_STATUS_NO_MEMORY;
 
+       if (smbXcli_conn_protocol(cli->conn) >= PROTOCOL_SMB2_02) {
+               return cli_smb2_get_ea_list_path(cli,
+                                       path,
+                                       ctx,
+                                       pnum_eas,
+                                       pea_list);
+       }
+
+       frame = talloc_stackframe();
+
        if (smbXcli_conn_has_async_calls(cli->conn)) {
                /*
                 * Can't use sync call while an async call is in flight