Hi Antonio
/* NOPURGE flag has not to go on the wire */
flags &= ~TT_CLIENT_NOPURGE;
tt_change_node->change.flags = flags;
I don't remember the packet format. But i assume flags on the wire is a u8? How about making TT_CLIENT_NOPURGE 1<<8 or bigger, so it is automatically not sent on the wire? It will also make it easier sometime in the future when you want to use the bit on the wire that TT_CLIENT_NOPURGE is currently taking.
You might also want to change the function parameters flags from int to uint, so avoiding sign extension problems.
Andrew