Wireshark-dev: [Wireshark-dev] Easy codec plugin

From: Gisle Vanem <gvanem@xxxxxxxxxxxx>
Date: Mon, 09 Feb 2009 12:15:34 +0100
I have problems with plugins\easy_codec\codec*.c.
E.g.  codec-g722.c fails to compile with gcc 3.4.5 (MingW)
because of:

struct g722_context {
 CODER_HANDLE handle;
 short speach_buffer[L_G722_FRAME];
};

void *codec_g722_init(void) {
 g722_context *ctx = 0;

-------------------

The struct should be typedef'ed AFAICS. An easy fix for me is
attached.
PS. Yes, I did build WireShark using MingW and my own makefile.
It went like a breeze except for the above problem.

--gv
diff -u3 -Hb -r ..\..\SVN-Latest\plugins\easy_codec\codec-g722.c .\codec-g722.c
--- ..\..\SVN-Latest\plugins\easy_codec\codec-g722.c	Wed Dec 12 12:16:33 2007
+++ .\codec-g722.c	Wed Dec 12 13:08:00 2007
@@ -34,10 +34,10 @@

#include "EasyG722/EasyG722.h"

-struct g722_context {
+typedef struct g722_context {
  CODER_HANDLE handle;
  short speach_buffer[L_G722_FRAME];
-};
+} g722_context;

void *codec_g722_init(void) {
  g722_context *ctx = 0;
diff -u3 -Hb -r ..\..\SVN-Latest\plugins\easy_codec\codec-g7231.c .\codec-g7231.c
--- ..\..\SVN-Latest\plugins\easy_codec\codec-g7231.c	Wed Dec 12 12:16:33 2007
+++ .\codec-g7231.c	Wed Dec 12 13:09:38 2007
@@ -34,11 +34,11 @@

#include "EasyG7231/EasyG7231.h"

-struct g7231_context {
+typedef struct g7231_context {
  CODER_HANDLE handle;
  short speach_buffer[L_G7231_FRAME];
  int l_g7231_frame_compressed;
-};
+} g7231_context;

void *codec_g7231_init(void) {
  g7231_context *ctx = 0;
diff -u3 -Hb -r ..\..\SVN-Latest\plugins\easy_codec\codec-g729a.c .\codec-g729a.c
--- ..\..\SVN-Latest\plugins\easy_codec\codec-g729a.c	Mon Dec 03 17:56:10 2007
+++ .\codec-g729a.c	Wed Dec 12 13:08:49 2007
@@ -34,10 +34,10 @@

#include "EasyG729A/EasyG729A.h"

-struct g729a_context {
+typedef struct g729a_context {
  CODER_HANDLE handle;
  short speach_buffer[L_G729A_FRAME];
-};
+} g729a_context;

void *codec_g729a_init(void) {
  g729a_context *ctx = 0;