Ethereal-dev: Re: [Ethereal-dev] Ethereal error message "file to_str.c: line 873: should not b
On Tue, Mar 30, 2004 at 11:38:10AM +0200, Biot Olivier wrote:
> Looks like I forgot to update epan/to_str.c when I added the AT_STRINGZ
> address type. I don't have CVS access right now (you'll have to wait for
> 10-12 hours) so if someone has this problem and wants to fix it before I do,
> please feel free to do so.
>
> FYI AT_STRINGZ is a null-terminated text string address type I use in SMPP
> reassembly (I set the source and destination telephone numbers as reassembly
> source and destination addresses).
>
> Maybe the sprintf() calls in address_to_str_buf() should be replaced with
> g_strprintf() etc. Then you have to add the following to the switch:
>
> case AT_STRINGZ:
> buf = g_strdup(addr->data);
> break;
"buf" is a buffer whose address is supplied to "address_to_str_buf()",
so that won't work.
"address_to_str_buf()" is used to fill in the column buffers; I guess we
could allocate them dynamically, but that might make generating the
column text more expensive.
For now, we'd have to have "address_to_str_buf()" take a buffer length
argument, and use that for AT_STRINGZ - the buffer *should* be long
enough for all other formats (if it's not, that's a bug).