41 size_t decode_remain = m_event->payload_len;
42 const uint8_t *decode_ptr = m_event->payload;
45 bool has_name =
decode_bool(&decode_ptr, &decode_remain);
51 oflags =
decode_i32(&decode_ptr, &decode_remain);
54 handle =
decode_i64(&decode_ptr, &decode_remain);
57 std::vector<Attribute> attrs;
58 uint32_t attr_count =
decode_i32(&decode_ptr, &decode_remain);
59 attrs.reserve(attr_count);
61 while (attr_count--) {
64 attrs.push_back(attr);
67 m_master->attr_set(&cb, m_session_id, handle, name, oflags, attrs);
71 cb.
error(e.
code(),
"Error handling ATTRSET message");
char * decode_vstr(const uint8_t **bufp, size_t *remainp)
Decode a vstr (vint64, data, null).
uint32_t decode_i32(const uint8_t **bufp, size_t *remainp)
Decode a 32-bit integer in little-endian order.
uint64_t decode_i64(const uint8_t **bufp, size_t *remainp)
Decode a 64-bit integer in little-endian order.
bool decode_bool(const uint8_t **bufp, size_t *remainp)
Decodes a boolean value from the given buffer.
const char * name
Name of extended attribute.
Logging routines and macros.
Compatibility Macros for C/C++.
virtual void run()
Carries out the request.
Functions to serialize/deserialize primitives to/from a memory buffer.
This class is used to generate and deliver standard responses back to a client.
virtual int error(int error, const String &msg)
Sends a standard error response back to the client.
const void * value
Pointer to attribute value.
This is a generic exception class for Hypertable.
Holds extended attribute and value.
Declarations for ResponseCallback.
Error codes, Exception handling, error logging.
uint32_t value_len
Length of attribute value.
int code() const
Returns the error code.