[aravis] fake_camera: stream ip address is stored in bigendian format.



commit 8875ac14b3d72030dd6718ed6bda35f603934a86
Author: Emmanuel Pacaud <emmanuel gnome org>
Date:   Thu May 12 20:34:53 2011 +0200

    fake_camera: stream ip address is stored in bigendian format.

 src/arvfakecamera.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/arvfakecamera.c b/src/arvfakecamera.c
index 3844110..30b5004 100644
--- a/src/arvfakecamera.c
+++ b/src/arvfakecamera.c
@@ -303,12 +303,13 @@ arv_fake_camera_get_stream_address (ArvFakeCamera *camera)
 {
 	GSocketAddress *stream_socket_address;
 	GInetAddress *inet_address;
+	guint32 value;
 
 	g_return_val_if_fail (ARV_IS_FAKE_CAMERA (camera), NULL);
 
-	inet_address = g_inet_address_new_from_bytes (camera->priv->memory +
-						      ARV_GVBS_STREAM_CHANNEL_0_IP_ADDRESS_OFFSET,
-						      G_SOCKET_FAMILY_IPV4);
+	value = GUINT32_FROM_BE (_get_register (camera, ARV_GVBS_STREAM_CHANNEL_0_IP_ADDRESS_OFFSET));
+
+	inet_address = g_inet_address_new_from_bytes ((guint8 *) &value, G_SOCKET_FAMILY_IPV4);
 	stream_socket_address = g_inet_socket_address_new
 		(inet_address,
 		 _get_register (camera, ARV_GVBS_STREAM_CHANNEL_0_PORT_OFFSET));



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