From c98390e80f5e31c69e6153b651d2946813fee691 Mon Sep 17 00:00:00 2001 From: Michael Davidsaver Date: Thu, 27 Feb 2020 09:32:15 -0800 Subject: [PATCH] oops --- src/client.cpp | 2 +- src/dataencode.cpp | 40 ++++++++++++++++++++-------------------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/client.cpp b/src/client.cpp index 2538905..b0f0cec 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -52,7 +52,7 @@ Channel::~Channel() context->chanByCID.erase(cid); context->chanByName.erase(name); // searchBuckets cleaned in tickSearch() - if(state==Creating || state==Active) { + if((state==Creating || state==Active) && conn && conn->bev) { { (void)evbuffer_drain(conn->txBody.get(), evbuffer_get_length(conn->txBody.get())); diff --git a/src/dataencode.cpp b/src/dataencode.cpp index 14f6b86..94f407f 100644 --- a/src/dataencode.cpp +++ b/src/dataencode.cpp @@ -358,22 +358,22 @@ void to_wire_field(Buffer& buf, const FieldDesc* desc, const std::shared_ptr(buf, fld); return; - case TypeCode::Int8: - case TypeCode::UInt8: + case TypeCode::Int8A: + case TypeCode::UInt8A: to_wire(buf, fld); return; - case TypeCode::Int16: - case TypeCode::UInt16: + case TypeCode::Int16A: + case TypeCode::UInt16A: to_wire(buf, fld); return; - case TypeCode::Int32: - case TypeCode::UInt32: - case TypeCode::Float32: + case TypeCode::Int32A: + case TypeCode::UInt32A: + case TypeCode::Float32A: to_wire(buf, fld); return; - case TypeCode::Int64: - case TypeCode::UInt64: - case TypeCode::Float64: + case TypeCode::Int64A: + case TypeCode::UInt64A: + case TypeCode::Float64A: to_wire(buf, fld); return; case TypeCode::StringA: @@ -592,22 +592,22 @@ void from_wire_field(Buffer& buf, TypeStore& ctxt, const FieldDesc* desc, const case TypeCode::BoolA: from_wire(buf, fld); return; - case TypeCode::Int8: - case TypeCode::UInt8: + case TypeCode::Int8A: + case TypeCode::UInt8A: from_wire(buf, fld); return; - case TypeCode::Int16: - case TypeCode::UInt16: + case TypeCode::Int16A: + case TypeCode::UInt16A: from_wire(buf, fld); return; - case TypeCode::Int32: - case TypeCode::UInt32: - case TypeCode::Float32: + case TypeCode::Int32A: + case TypeCode::UInt32A: + case TypeCode::Float32A: from_wire(buf, fld); return; - case TypeCode::Int64: - case TypeCode::UInt64: - case TypeCode::Float64: + case TypeCode::Int64A: + case TypeCode::UInt64A: + case TypeCode::Float64A: from_wire(buf, fld); return; case TypeCode::StringA: