Boost logo

Boost Users :

Subject: Re: [Boost-users] Problem with Serialization: invalid signature
From: Alexander Striffeler (a.striffeler_at_[hidden])
Date: 2013-04-04 08:20:57


Thanks for pointing that out - actually, it was just an oversight. I
first pasted the code (where the type is CCNDataPkt) and then thought it
might of no interest what kind of packet the type is - and forgot to
adapt it in the deserialization part.
In fact, types _are_ the same - I'm sorry for the confusion!

On 04.04.2013 14:11, Igor R wrote:
>> deSerialize(Packet p1, Packet p2){ // Version 1 using stringstreams
> <...>
>> boost::archive::text_oarchive oa(serialized[0]);
>> oa << p1;
> <...>
>> //deserialize
>> CCNDataPkt newPacket;
> <...>
>> ia >> newPacket; // throws boost::archive::archive_exception: invalid signature.
>
> It looks like you serialize one type and deserialize another one, don't you?
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net