Cuestion about Packet::uniqueify()

Juan Luis Baptiste juancho at linuxmail.org
Thu Oct 24 02:07:38 EDT 2002


 Hi Eddie, 
 
I have a little cuestion about Packet::uniqueify() method. I read in the C++ Programming manual that this method returns a 
WritablePacket that doesn't share the packet's data. Well, I'm using this method (in the way that is used in ftpportmapper element), 
and by mistake, after the translation of the packet I was pushing the original packet  instead of the new writable one. As a result, 
the packet was arriving at the ftp server with the correct translated content. As I see it, the new writable packet is endeed sharing 
the same data as the original one, or what is happening? 
 
Another cuestion, why if I push a packet through an output, the rest of the element code after the push is executed? I was doing a 
validation about the packet's content looking for EPRT/EPSV/PASV/PORT commands, if none of the was found I pushed the packet through 
an output, but the code after this push, the one that does the translation was getting executed. I know that this was happening 
because some click_chatter messages that I have in that part of the code where getting displayed after the push (but not 
inmediatedly), and a I had a seg fault too, until I puted that code into a big if (command_found){ ... }. can any one give me an 
explanation of what is happening here? 
 
Thanks, 
 
Juan Luis 
 
 
-- 

Powered by Outblaze




More information about the click mailing list