Ethereal-dev: [Ethereal-dev] Problems with "Save Highlighted Data..."

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Kai Krüger <kai@xxxxxxxxxxxxxx>
Date: Wed, 17 Dec 2003 20:34:19 +0100
Hello,

I was trying to use the "Save Highlighted Data..." feature using todays CVS code, however it didn't write the specified file to disk. Looking at the source, the problem seems to be in gtk/proto_draw.c in the function savehex_save_clicked_cb(). The file string was always empty, even though a file was specified in the dialog. Moving the gtk_wiget_destroy(GTK_WIGET(savehex_dlg)) to the end of the function, after the open() call solved the problem for me. I suspect, that the gtk_wiget_destroy also frees the memory of the file string and the operations on the file string after the call to gtk_wiget_destroy therefore always failed.

If wanted, I can supply a patch that moves the gtk_wiget_destroy to the end of the function. However as I'm neither familiar with ethereal nor GTK coding (styles) I don't know if this is the correct way to fix the problem

Thanks,
Kai

P.S. please CC me in on replies, as I'm not subscribed to the list