monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] making I(), E(), N() throw bad_decode for network d


From: Stephen Leake
Subject: Re: [Monotone-devel] making I(), E(), N() throw bad_decode for network data
Date: Mon, 10 Nov 2008 07:06:09 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)

Timothy Brownawell <address@hidden> writes:

> I've just pushed a revision that makes the sanity macros look at a
> 'made_from' value, and throw bad_decode instead of their normal behavior
> if that value is set to made_from_network. ATOMIC and ENCODING types and
> revision_t have a member like this, and
>       revision_t rev;
>       rev.made_from = made_from_network;
>       read_revision(garbage_data, rev);
> does actually throw bad_decode now for at least some kinds of garbage.

I gather the network sync code handles bad_decode gracefully.

> I don't particularly like having the macros take a "hidden" argument
> like this <snip>

We could define a new set of macros to use in the network sync code.

But I guess that doesn't help if the network code calls a function
from another file that uses the standard macros.

-- 
-- Stephe




reply via email to

[Prev in Thread] Current Thread [Next in Thread]