dovecot-1.2: fts-solr: Fixed compiling with recent struct mail_u...

dovecot at dovecot.org dovecot at dovecot.org
Wed Aug 27 08:21:44 EEST 2008


details:   http://hg.dovecot.org/dovecot-1.2/rev/e7929190cd32
changeset: 8109:e7929190cd32
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Aug 27 08:21:39 2008 +0300
description:
fts-solr: Fixed compiling with recent struct mail_user changes.

diffstat:

1 file changed, 6 insertions(+), 5 deletions(-)
src/plugins/fts-solr/fts-backend-solr.c |   11 ++++++-----

diffs (52 lines):

diff -r b46b0158eb64 -r e7929190cd32 src/plugins/fts-solr/fts-backend-solr.c
--- a/src/plugins/fts-solr/fts-backend-solr.c	Wed Aug 27 08:07:51 2008 +0300
+++ b/src/plugins/fts-solr/fts-backend-solr.c	Wed Aug 27 08:21:39 2008 +0300
@@ -4,6 +4,7 @@
 #include "array.h"
 #include "str.h"
 #include "mail-storage-private.h"
+#include "mail-namespace.h"
 #include "solr-connection.h"
 #include "fts-solr-plugin.h"
 
@@ -93,7 +94,7 @@ static int fts_backend_solr_get_last_uid
 	str_printfa(str, "uidv:%u%%20box:", status.uidvalidity);
 	solr_quote_str(str, backend->box->name);
 	str_append(str, "%20user:");
-	solr_quote_str(str, backend->box->storage->user);
+	solr_quote_str(str, backend->box->storage->ns->user->username);
 
 	t_array_init(&uids, 1);
 	if (solr_connection_select(solr_conn, str_c(str), &uids, NULL) < 0)
@@ -160,11 +161,11 @@ fts_backend_solr_build_more(struct fts_b
 		str_append(cmd, "<field name=\"box\">");
 		xml_encode(cmd, box->name);
 		str_append(cmd, "</field><field name=\"user\">");
-		xml_encode(cmd, box->storage->user);
+		xml_encode(cmd, box->storage->ns->user->username);
 
 		str_printfa(cmd, "</field><field name=\"id\">%u/%u/",
 			    uid, ctx->uid_validity);
-		xml_encode(cmd, box->storage->user);
+		xml_encode(cmd, box->storage->ns->user->username);
 		str_append_c(cmd, '/');
 		xml_encode(cmd, box->name);
 		str_append(cmd, "</field>");
@@ -228,7 +229,7 @@ fts_backend_solr_expunge(struct fts_back
 		cmd = t_str_new(256);
 		str_printfa(cmd, "<delete><id>%u/%u/",
 			    mail->uid, status.uidvalidity);
-		xml_encode(cmd, mail->box->storage->user);
+		xml_encode(cmd, mail->box->storage->ns->user->username);
 		str_append_c(cmd, '/');
 		xml_encode(cmd, mail->box->name);
 		str_append(cmd, "</id></delete>");
@@ -300,7 +301,7 @@ static int fts_backend_solr_lookup(struc
 	str_printfa(str, "&fq=uidv:%u%%20box:", status.uidvalidity);
 	solr_quote_str(str, box->name);
 	str_append(str, "%20user:");
-	solr_quote_str(str, box->storage->user);
+	solr_quote_str(str, box->storage->ns->user->username);
 
 	array_clear(maybe_uids);
 	return solr_connection_select(solr_conn, str_c(str),


More information about the dovecot-cvs mailing list