dovecot-1.1: fts-solr: Don't assert-crash if we couldn't connect...
dovecot at dovecot.org
dovecot at dovecot.org
Sat Nov 15 19:03:19 EET 2008
details: http://hg.dovecot.org/dovecot-1.1/rev/c12c86ef42ce
changeset: 8005:c12c86ef42ce
user: Timo Sirainen <tss at iki.fi>
date: Sat Nov 15 19:03:16 2008 +0200
description:
fts-solr: Don't assert-crash if we couldn't connect to Solr.
diffstat:
1 file changed, 9 insertions(+), 1 deletion(-)
src/plugins/fts-solr/solr-connection.c | 10 +++++++++-
diffs (28 lines):
diff -r d5e793db147c -r c12c86ef42ce src/plugins/fts-solr/solr-connection.c
--- a/src/plugins/fts-solr/solr-connection.c Sat Nov 15 18:48:33 2008 +0200
+++ b/src/plugins/fts-solr/solr-connection.c Sat Nov 15 19:03:16 2008 +0200
@@ -397,8 +397,9 @@ void solr_connection_post_more(struct so
fd_set fdexcep;
struct timeval timeout_tv;
long timeout;
+ CURLMsg *msg;
CURLMcode merr;
- int ret, handles, maxfd;
+ int ret, handles, maxfd, n;
i_assert(post->conn->posting);
@@ -423,6 +424,13 @@ void solr_connection_post_more(struct so
/* everything sent successfully */
return;
}
+ msg = curl_multi_info_read(post->conn->curlm, &n);
+ if (msg != NULL && msg->msg == CURLMSG_DONE &&
+ msg->data.result != CURLE_OK) {
+ i_error("fts_solr: curl post failed: %s",
+ curl_easy_strerror(msg->data.result));
+ break;
+ }
/* everything wasn't sent - wait. just use select,
since libcurl interface is easiest with it. */
More information about the dovecot-cvs
mailing list