dovecot-1.2: fts-solr: Don't assert-crash if we couldn't connect...
dovecot at dovecot.org
dovecot at dovecot.org
Sat Nov 15 19:03:04 EET 2008
details: http://hg.dovecot.org/dovecot-1.2/rev/83cad8a5bf15
changeset: 8401:83cad8a5bf15
user: Timo Sirainen <tss at iki.fi>
date: Sat Nov 15 19:03:00 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 ce4779b95fc8 -r 83cad8a5bf15 src/plugins/fts-solr/solr-connection.c
--- a/src/plugins/fts-solr/solr-connection.c Sat Nov 15 18:48:52 2008 +0200
+++ b/src/plugins/fts-solr/solr-connection.c Sat Nov 15 19:03:00 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