Even with the workaround I sent you, the KADEMLIA_PUBLISH_REQ packet contains wrong data, and is dropped by other clients.
My patch solved the issues with tag name serialization, there's still an oustanding problem.
the TAG_SOURCES value is wrong.
an amule client trying to share a new file will send the TAG_SOURCES value set to ZERO.
Any client receiving this message will discard it.
So the new file is really *not published* on the kad net.
I made this dirty workaround:
In method void CSearch::PreparePacketForTags( CMemFile *bio, CKnownFile *file)
I changed the line
taglist.push_back(new CTagVarInt(TAG_SOURCES, (uint32)file->m_nCompleteSourcesCount));
to
taglist.push_back(new CTagVarInt(TAG_SOURCES, max(1, (uint32)file->m_nCompleteSourcesCount)) );
and I could successfully publish new files on kad.
PS: I forgot, you must define also a max inline method
inline uint32 max( uint32 a, uint32 b )
{
return ( a>b ? a:b );
}