Comment 6 for bug 1318151

Revision history for this message
Ezra Forbus (ezraforbus) wrote :

The following patch worked for me:

--- gearmand-1.1.12/libgearman/client.cc 2014-02-11 18:05:28.000000000 -0600
+++ ../gearmand-1.1.12/libgearman/client.cc 2014-07-10 13:42:13.000000000 -0500
@@ -599,7 +599,7 @@
   {
     Client* client= client_shell->impl();

- if (gearman_connection_create(client->universal, host, port) == false)
+ if (gearman_connection_create(client->universal, host, port) == NULL)
     {
       assert(client->error_code() != GEARMAN_SUCCESS);
       return client->error_code();
@@ -614,7 +614,7 @@

 gearman_return_t Client::add_server(const char *host, const char* service_)
 {
- if (gearman_connection_create(universal, host, service_) == false)
+ if (gearman_connection_create(universal, host, service_) == NULL)
   {
     assert(error_code() != GEARMAN_SUCCESS);
     return error_code();
@@ -946,7 +946,7 @@
       *denominator= do_task->impl()->denominator;
     }

- if (is_known == false and is_running == false)
+ if (! is_known and ! is_running)
     {
       if (do_task->impl()->options.is_running)
       {

NOTE: I haven't tested this extensively (other than running make test) so would advise people to use with caution.