mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-27 00:19:25 -05:00
fixed bug in history serializer
This commit is contained in:
parent
214aaa7c9b
commit
4f4240d570
@ -51,12 +51,12 @@ void RsHistoryMsgItem::serial_process(RsGenericSerializer::SerializeJob j,RsGene
|
||||
RsTypeSerializer::serial_process (j,ctx,TLV_TYPE_STR_MSG,message,"message") ;
|
||||
}
|
||||
|
||||
RsItem *RsHistorySerialiser::create_item(uint8_t serial_class,uint8_t serial_type) const
|
||||
RsItem *RsHistorySerialiser::create_item(uint8_t item_type,uint8_t item_subtype) const
|
||||
{
|
||||
if(serial_class != RS_PKT_CLASS_CONFIG)
|
||||
if(item_type != RS_PKT_TYPE_HISTORY_CONFIG)
|
||||
return NULL ;
|
||||
|
||||
if(serial_type == RS_PKT_SUBTYPE_DEFAULT)
|
||||
if(item_subtype == RS_PKT_SUBTYPE_DEFAULT)
|
||||
return new RsHistoryMsgItem();
|
||||
|
||||
return NULL ;
|
||||
|
@ -63,7 +63,7 @@ public:
|
||||
RsHistorySerialiser() : RsConfigSerializer(RS_PKT_CLASS_CONFIG, RS_PKT_TYPE_HISTORY_CONFIG) {}
|
||||
virtual ~RsHistorySerialiser() {}
|
||||
|
||||
virtual RsItem *create_item(uint8_t service,uint8_t type) const ;
|
||||
virtual RsItem *create_item(uint8_t item_type,uint8_t item_subtype) const ;
|
||||
};
|
||||
|
||||
/**************************************************************************/
|
||||
|
@ -289,7 +289,7 @@ public:
|
||||
/*! create_item
|
||||
* should be overloaded to create the correct type of item depending on the data
|
||||
*/
|
||||
virtual RsItem *create_item(uint8_t /* class */, uint8_t /* item_type */) const=0;
|
||||
virtual RsItem *create_item(uint8_t /* item_type */, uint8_t /* item_sub_type */) const=0;
|
||||
|
||||
RsItem *deserialise(void *data,uint32_t *size) ;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user