Introduce a new function called have_tap_listener(int tap_id) to
tell if a specific tap id is currently listening for data. This complements the function have_tap_listeners(), which checks to see if any tap is currently listening. svn path=/trunk/; revision=20979
This commit is contained in:
parent
61c8b55913
commit
8d8452b419
16
epan/tap.c
16
epan/tap.c
|
@ -460,3 +460,19 @@ have_tap_listeners(void)
|
|||
{
|
||||
return tap_listener_queue != NULL;
|
||||
}
|
||||
|
||||
/* Returns TRUE there is an active tap listener for the specified tap id. */
|
||||
gboolean
|
||||
have_tap_listener(int tap_id)
|
||||
{
|
||||
volatile tap_listener_t *tap_queue = tap_listener_queue;
|
||||
|
||||
while(tap_queue) {
|
||||
if(tap_queue->tap_id == tap_id)
|
||||
return TRUE;
|
||||
|
||||
tap_queue = tap_queue->next;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
@ -50,6 +50,7 @@ extern GString *register_tap_listener(const char *tapname, void *tapdata,
|
|||
tap_draw_cb tap_draw);
|
||||
extern void remove_tap_listener(void *tapdata);
|
||||
extern gboolean have_tap_listeners(void);
|
||||
extern gboolean have_tap_listener(int tap_id);
|
||||
extern const void *fetch_tapped_data(int tap_id, int idx);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue