-Original Message-
> From: iotivity-dev-bounces at lists.iotivity.org [mailto:iotivity-dev-bounces
> at lists.iotivity.org] On Behalf Of Keane, Erich
> Sent: Friday, October 23, 2015 10:49 AM
> To: Macieira, Thiago
> Cc: iotivity-dev at lists.iotivity.org
> Subject: Re: [dev] questi
ce. Still...
John
-Original Message-
From: iotivity-dev-bounces at lists.iotivity.org
[mailto:iotivity-dev-boun...@lists.iotivity.org] On Behalf Of Keane, Erich
Sent: Friday, October 23, 2015 10:49 AM
To: Macieira, Thiago
Cc: iotivity-dev at lists.iotivity.org
Subject: Re: [dev] question abo
Yep, thanks Thiago. That is the situation where we use err = err | vs
err = err ||, since that is the only error code we are capable of
recovering from.
On Fri, 2015-10-23 at 10:47 -0700, Thiago Macieira wrote:
> On Friday 23 October 2015 17:41:12 Keane, Erich wrote:
> > The err = err | is only
I'm not terribly involved anymore, but since I ended up writing most of
that, I'll respond. I will say that it is based on the examples from
the tinycbor library, I'm not sure how I would have done it otherwise.
The err = err | is only used in a few places where
knowing the error afterwards is i
t;> From: iotivity-dev-bounces at lists.iotivity.org
>> [mailto:iotivity-dev-bounces at lists.iotivity.org] On Behalf Of Keane, Erich
>> Sent: Friday, October 23, 2015 10:49 AM
>> To: Macieira, Thiago
>> Cc: iotivity-dev at lists.iotivity.org
>> Subject: Re: [dev]
I'm not sure where to direct this issue.
Throughout the payload code in IoTivity there is a pattern like this:
err = err |
err = err |
...
The result is accumulation of error codes in 'err' and less error code testing.
I see two problems with this:
*
On Friday 23 October 2015 10:58:04 Keane, Erich wrote:
> The tinycbor library is really good about not writing past the buffer,
> unless you lie to it about how much was allocated. I'm sure Thiago
> would be really interested to see a situation where this isn't the case.
I am. The backtrace is us
On Friday 23 October 2015 17:41:12 Keane, Erich wrote:
> The err = err | is only used in a few places where
> knowing the error afterwards is important, for most situations, the
> error code is pretty meaningless since there is nothing we can do about
> it.
To be clear: there's only one error cod