revert most of d7a0084bf99d618d1dc26a54fd413db7ae8b8e63
[awesomized/libmemcached] / src / libmemcached / purge.cc
index ae3961b2c445679f7dda3b13684a3ce7e6450bc0..ff0321052ab6117b63d7ff7b15173ca6a0ee5d6e 100644 (file)
@@ -1,6 +1,6 @@
 /*
     +--------------------------------------------------------------------+
-    | libmemcached - C/C++ Client Library for memcached                  |
+    | libmemcached-awesome - C/C++ Client Library for memcached          |
     +--------------------------------------------------------------------+
     | Redistribution and use in source and binary forms, with or without |
     | modification, are permitted under the terms of the BSD license.    |
@@ -9,13 +9,13 @@
     | the terms online at: https://opensource.org/licenses/BSD-3-Clause  |
     +--------------------------------------------------------------------+
     | Copyright (c) 2006-2014 Brian Aker   https://datadifferential.com/ |
-    | Copyright (c) 2020 Michael Wallner   <mike@php.net>                |
+    | Copyright (c) 2020-2021 Michael Wallner        https://awesome.co/ |
     +--------------------------------------------------------------------+
 */
 
 #include "libmemcached/common.h"
 
-#define memcached_set_purging(__object, __value) ((__object)->state.is_purging = (__value))
+#define memcached_set_purging(object_, value_) ((object_)->state.is_purging = (value_))
 
 class Purge {
 public:
@@ -108,11 +108,8 @@ bool memcached_purge(memcached_instance_st *ptr) {
         WATCHPOINT_ERROR(rc);
         is_successful = false;
       }
-      if (rc == MEMCACHED_TIMEOUT) {
-        break;
-      }
 
-      if (ptr->root->callbacks != NULL) {
+      if (ptr->root->callbacks) {
         memcached_callback_st cb = *ptr->root->callbacks;
         if (memcached_success(rc)) {
           for (uint32_t y = 0; y < cb.number_of_callback; y++) {