X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=lttv%2Flttv%2Fsync%2Fdata_structures.c;h=6bdf0b257a697aea73b2b9536d4e09df895f91ad;hb=fafb0a2998296c564cbc26c2c0fa5142b181b332;hp=c4d4d966f31025db80058b69bfadb4762411f8ef;hpb=d4721e1a5216f34570d7e10257f85601cb3991bc;p=lttv.git diff --git a/lttv/lttv/sync/data_structures.c b/lttv/lttv/sync/data_structures.c index c4d4d966..6bdf0b25 100644 --- a/lttv/lttv/sync/data_structures.c +++ b/lttv/lttv/sync/data_structures.c @@ -34,10 +34,6 @@ #include "data_structures.h" -#ifndef g_info -#define g_info(format...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_INFO, format) -#endif - // TCP sequence numbers use clock arithmetic, these comparison functions take // that into account #define SEQ_LT(a,b) ((int32_t)((a)-(b)) < 0) @@ -640,3 +636,16 @@ void copyUDPEvent(const Event* const event, Event** const newEvent) memcpy((*newEvent)->event.udpEvent->datagramKey, event->event.udpEvent->datagramKey, sizeof(DatagramKey)); } + + +/* + * A GFunc for g_queue_foreach() + * + * Args: + * data Event*, event to add + * user_data GArray*, array to add to + */ +void gfAddEventToArray(gpointer data, gpointer user_data) +{ + g_array_append_val((GArray*) user_data, data); +}