Wait a minute: this method should be made available to all dissectors! There
are more dissectors requiring zlib decompression (HTTP, maybe WSP in the
future...).
This is also true for the (momentarily not yet available) chunked transfer
coding used e.g. in HTTP (and WSP).
Regards,
Olivier
|-----Original Message-----
|From: Anders Broman (TN/EAB)
|
|Hi,
|I get the following errors when compiling todays cvs-tarball.
|Best regards
|Anders
|
|
|packet-slsk.c
|packet-slsk.c(307) : error C2057: expected constant expression
|packet-slsk.c(307) : error C2466: cannot allocate an array of con
|packet-slsk.c(307) : error C2133: 'compr' : unknown size
|packet-slsk.c(310) : error C2057: expected constant expression
|packet-slsk.c(310) : error C2466: cannot allocate an array of con
|packet-slsk.c(310) : error C2133: 'uncompr' : unknown size
|
|Line 307: char compr[comprlen
|---- snip ---
|#ifdef HAVE_LIBZ
|static tvbuff_t* uncompress_packet(tvbuff_t *tvb, int offset,
|int comprlen){
|
| /*
| * Uncompresses a zlib compressed packet inside a
|message of tvb at offset with length comprlen
| * Returns an uncompressed tvbuffer if uncompression succeeded
| * or NULL if uncompression failed
| */
|
| char compr[comprlen];
| int i = 0;
| long uncomprlen = (comprlen*10);
| char uncompr[uncomprlen];
| int err = 0;
| tvbuff_t *uncompr_tvb;
|---- snip ---