aboutsummaryrefslogtreecommitdiffstats
path: root/capture.c
diff options
context:
space:
mode:
authorLuis Ontanon <luis.ontanon@gmail.com>2013-06-27 17:10:50 +0000
committerLuis Ontanon <luis.ontanon@gmail.com>2013-06-27 17:10:50 +0000
commit0bdc0efc46ec66a298306aae253225c702ed6bea (patch)
tree1d6db93f3252994330777f123cb3d038518080e9 /capture.c
parentb450609a5561db9ddfc23b41c742979f5c4b3a32 (diff)
get main_window_update out of the way... pass an update_cb to the capture_sync stuff
... as per the XXX comment removed from tshark.c this was a mess to keep the linker happy... I couldn't! I did this without even understanding whether calling main_window_update was realy necessary in most cases. I guess nothing or more specific update cbs would be best. svn path=/trunk/; revision=50188
Diffstat (limited to 'capture.c')
-rw-r--r--capture.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/capture.c b/capture.c
index ae940a2d69..5868923fb4 100644
--- a/capture.c
+++ b/capture.c
@@ -130,7 +130,7 @@ capture_callback_remove(capture_callback_t func)
* @return TRUE if the capture starts successfully, FALSE otherwise.
*/
gboolean
-capture_start(capture_options *capture_opts, capture_session *cap_session)
+capture_start(capture_options *capture_opts, capture_session *cap_session, void(*update_cb)(void))
{
gboolean ret;
guint i;
@@ -168,7 +168,7 @@ capture_start(capture_options *capture_opts, capture_session *cap_session)
cf_set_tempfile_source((capture_file *)cap_session->cf, source->str);
g_string_free(source, TRUE);
/* try to start the capture child process */
- ret = sync_pipe_start(capture_opts, cap_session);
+ ret = sync_pipe_start(capture_opts, cap_session, update_cb);
if(!ret) {
if(capture_opts->save_file != NULL) {
g_free(capture_opts->save_file);
@@ -660,7 +660,7 @@ capture_input_closed(capture_session *cap_session, gchar *msg)
/* close the currently loaded capture file */
cf_close((capture_file *)cap_session->cf);
- capture_start(capture_opts, cap_session);
+ capture_start(capture_opts, cap_session,NULL); /*XXX is this NULL ok or we need an update_cb???*/
} else {
/* We're not doing a capture any more, so we don't have a save file. */
g_free(capture_opts->save_file);
@@ -696,7 +696,7 @@ capture_stat_start(capture_options *capture_opts) {
* mechanism, so opening all the devices and presenting packet
* counts might not always be a good idea.
*/
- if (sync_interface_stats_open(&stat_fd, &fork_child, &msg) == 0) {
+ if (sync_interface_stats_open(&stat_fd, &fork_child, &msg, NULL) == 0) {
sc = (if_stat_cache_t *)g_malloc(sizeof(if_stat_cache_t));
sc->stat_fd = stat_fd;
sc->fork_child = fork_child;