From 73927243e74356ee055a1b77f0c3a23eb78e7d89 Mon Sep 17 00:00:00 2001 From: Richard Sharpe Date: Sun, 26 Mar 2000 07:59:47 +0000 Subject: [PATCH] Adding definitions of routines ... Will want to get rid of malloc and use the glib equivalents ... svn path=/trunk/; revision=1750 --- packet.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/packet.c b/packet.c index 4182e1c54b..d40c8adba0 100644 --- a/packet.c +++ b/packet.c @@ -1,7 +1,7 @@ /* packet.c * Routines for packet disassembly * - * $Id: packet.c,v 1.67 2000/03/26 06:57:40 sharpe Exp $ + * $Id: packet.c,v 1.68 2000/03/26 07:59:47 sharpe Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs @@ -42,6 +42,7 @@ #include #include +#include #include #include #include @@ -1188,8 +1189,17 @@ p_add_proto_data(frame_data *fd, int proto, void *proto_data) void * p_get_proto_data(frame_data *fd, int proto) { + frame_proto_data temp; + GSList *item; - return(NULL); + temp.proto = proto; + temp.proto_data = NULL; + + item = g_slist_find_custom(fd->pfd, (gpointer *)&temp, p_compare); + + if (item) return (void *)item->data; + + return NULL; }