- int32_t timeout = ptr->root->poll_timeout;
- ptr->root->poll_timeout = 1;
- memcached_response(ptr, buffer, sizeof(buffer), &result);
- ptr->root->poll_timeout = timeout;
+ timeout= ptr->root->poll_timeout;
+ ptr->root->poll_timeout= 1;
+ result_ptr= memcached_result_create(ptr->root, &result);
+
+ if (result_ptr == NULL)
+ return MEMCACHED_FAILURE;
+
+ WATCHPOINT_ASSERT(ptr->fd != -1);
+ rc= memcached_response(ptr, buffer, sizeof(buffer), &result);
+ WATCHPOINT_ERROR(rc);
+ WATCHPOINT_ASSERT(ptr->fd != -1);
+ ptr->root->poll_timeout= timeout;