[aravis] gv_device: use a define for the heartbeat retry timeout.



commit fcf3aec7398d3c7faa8fa73ac2ba1d9e0f20d801
Author: Emmanuel Pacaud <emmanuel gnome org>
Date:   Mon Jul 11 19:23:02 2011 +0200

    gv_device: use a define for the heartbeat retry timeout.

 docs/reference/aravis/aravis-sections.txt |    1 +
 src/arvgvdevice.c                         |    2 +-
 src/arvgvdevice.h                         |    1 +
 3 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/docs/reference/aravis/aravis-sections.txt b/docs/reference/aravis/aravis-sections.txt
index 0033184..22ffcae 100644
--- a/docs/reference/aravis/aravis-sections.txt
+++ b/docs/reference/aravis/aravis-sections.txt
@@ -433,6 +433,7 @@ ARV_GV_DEVICE_GVCP_TIMEOUT_MS_DEFAULT
 ARV_GV_DEVICE_GVSP_PACKET_SIZE_DEFAULT
 ARV_GV_DEVICE_HEARTBEAT_PERIOD_US
 ARV_GV_DEVICE_HEARTBEAT_RETRY_DELAY_US
+ARV_GV_DEVICE_HEARTBEAT_RETRY_TIMEOUT_S
 ARV_GV_DEVICE_BUFFER_SIZE
 ArvGvDeviceClass
 ArvGvDevicePrivate
diff --git a/src/arvgvdevice.c b/src/arvgvdevice.c
index a933d69..f5248f2 100644
--- a/src/arvgvdevice.c
+++ b/src/arvgvdevice.c
@@ -353,7 +353,7 @@ arv_gv_device_heartbeat_thread (void *data)
 			g_timer_start (timer);
 
 			while (!_read_register (io_data, ARV_GVBS_CONTROL_CHANNEL_PRIVILEGE_OFFSET, &value) &&
-			       g_timer_elapsed (timer, NULL) < 5.0 /* FIXME */ &&
+			       g_timer_elapsed (timer, NULL) < ARV_GV_DEVICE_HEARTBEAT_RETRY_TIMEOUT_S &&
 			       !thread_data->cancel) {
 				g_usleep (ARV_GV_DEVICE_HEARTBEAT_RETRY_DELAY_US);
 				counter++;
diff --git a/src/arvgvdevice.h b/src/arvgvdevice.h
index 9277e5b..f67efab 100644
--- a/src/arvgvdevice.h
+++ b/src/arvgvdevice.h
@@ -33,6 +33,7 @@ G_BEGIN_DECLS
 #define	ARV_GV_DEVICE_GVCP_TIMEOUT_MS_DEFAULT	500
 #define	ARV_GV_DEVICE_HEARTBEAT_PERIOD_US	1000000
 #define	ARV_GV_DEVICE_HEARTBEAT_RETRY_DELAY_US	10000
+#define	ARV_GV_DEVICE_HEARTBEAT_RETRY_TIMEOUT_S	5.0		/* FIXME */
 
 #define ARV_GV_DEVICE_GVSP_PACKET_SIZE_DEFAULT	1500
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]