[SCM] Samba Shared Repository - branch master updated
Matthieu Patou
mat at samba.org
Fri Nov 26 14:33:01 MST 2010
The branch, master has been updated
via 58db821 Fix endianess problems as discovered on the build farm
via e8ae340 ldb-tdb: Add more information about full scan
from 70a7da0 s3/configure: fix GNU ld version detection with old gcc releases
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 58db821de1cc8c3eca9257638e7ed1b250b28400
Author: Matthieu Patou <mat at matws.net>
Date: Fri Nov 26 23:45:13 2010 +0300
Fix endianess problems as discovered on the build farm
Autobuild-User: Matthieu Patou <mat at samba.org>
Autobuild-Date: Fri Nov 26 22:32:16 CET 2010 on sn-devel-104
commit e8ae340421aa62d396543d183641eeecf0ab2b96
Author: Matthieu Patou <mat at matws.net>
Date: Wed Nov 24 00:14:10 2010 +0300
ldb-tdb: Add more information about full scan
-----------------------------------------------------------------------
Summary of changes:
lib/compression/lzxpress.c | 11 ++++++-----
source4/lib/ldb/ldb_tdb/ldb_search.c | 8 +++++++-
2 files changed, 13 insertions(+), 6 deletions(-)
Changeset truncated at 500 lines:
diff --git a/lib/compression/lzxpress.c b/lib/compression/lzxpress.c
index 0396c9d..a4ded7e 100644
--- a/lib/compression/lzxpress.c
+++ b/lib/compression/lzxpress.c
@@ -34,6 +34,7 @@
#include "replace.h"
#include "lzxpress.h"
+#include "../lib/util/byteorder.h"
#define __BUF_POS_CONST(buf,ofs)(((const uint8_t *)buf)+(ofs))
@@ -130,11 +131,11 @@ ssize_t lzxpress_compress(const uint8_t *uncompressed,
if (best_len < 10) {
/* Classical meta-data */
metadata = (uint16_t)(((best_offset - 1) << 3) | (best_len - 3));
- dest[metadata_size / sizeof(uint16_t)] = metadata;
+ SSVAL(dest, metadata_size / sizeof(uint16_t), metadata);
metadata_size += sizeof(uint16_t);
} else {
metadata = (uint16_t)(((best_offset - 1) << 3) | 7);
- dest[metadata_size / sizeof(uint16_t)] = metadata;
+ SSVAL(dest, metadata_size / sizeof(uint16_t), metadata);
metadata_size = sizeof(uint16_t);
if (best_len < (15 + 7 + 3)) {
@@ -199,7 +200,7 @@ ssize_t lzxpress_compress(const uint8_t *uncompressed,
indic_bit++;
if ((indic_bit - 1) % 32 > (indic_bit % 32)) {
- *(uint32_t *)indic_pos = indic;
+ SIVAL(indic_pos, 0, indic);
indic = 0;
indic_pos = &compressed[compressed_pos];
compressed_pos += sizeof(uint32_t);
@@ -213,7 +214,7 @@ ssize_t lzxpress_compress(const uint8_t *uncompressed,
uncompressed_pos++;
compressed_pos++;
if (((indic_bit - 1) % 32) > (indic_bit % 32)){
- *(uint32_t *)indic_pos = indic;
+ SIVAL(indic_pos, 0, indic);
indic = 0;
indic_pos = &compressed[compressed_pos];
compressed_pos += sizeof(uint32_t);
@@ -225,7 +226,7 @@ ssize_t lzxpress_compress(const uint8_t *uncompressed,
indic |= 0 << (32 - ((indic_bit % 32) + 1));
*(uint32_t *)&compressed[compressed_pos] = 0;
- *(uint32_t *)indic_pos = indic;
+ SIVAL(indic_pos, 0, indic);
compressed_pos += sizeof(uint32_t);
}
diff --git a/source4/lib/ldb/ldb_tdb/ldb_search.c b/source4/lib/ldb/ldb_tdb/ldb_search.c
index b58243c..a49751d 100644
--- a/source4/lib/ldb/ldb_tdb/ldb_search.c
+++ b/source4/lib/ldb/ldb_tdb/ldb_search.c
@@ -582,7 +582,13 @@ int ltdb_search(struct ltdb_context *ctx)
/* useful for debugging when slow performance
* is caused by unindexed searches */
char *expression = ldb_filter_from_tree(ctx, ctx->tree);
- ldb_debug(ldb, LDB_DEBUG_WARNING, "ldb FULL SEARCH: %s\n", expression);
+ ldb_debug(ldb, LDB_DEBUG_WARNING, "ldb FULL SEARCH: %s SCOPE: %s DN: %s\n",
+ expression,
+ req->op.search.scope==LDB_SCOPE_BASE?"base":
+ req->op.search.scope==LDB_SCOPE_ONELEVEL?"one":
+ req->op.search.scope==LDB_SCOPE_SUBTREE?"sub":"UNKNOWN",
+ ldb_dn_get_linearized(req->op.search.base));
+
talloc_free(expression);
}
if (match_count != 0) {
--
Samba Shared Repository
More information about the samba-cvs
mailing list