aboutsummaryrefslogtreecommitdiffstats
path: root/src/uri
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2017-04-26 15:32:12 +0200
committerFlorin Coras <florin.coras@gmail.com>2017-05-09 17:52:43 +0000
commit7bee80c823ca77de3aca803fdede77e4c7385a52 (patch)
tree827e8815fe68d70a5220a3e2890d37c299845e6d /src/uri
parentb0972cbb35550619483b90004a00566f9641f983 (diff)
Fix remaining 32-bit compile issues
Change-Id: I9664214652229b663c3e3ba7406b4ede96bfb123 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/uri')
-rwxr-xr-xsrc/uri/uri_tcp_test.c21
-rw-r--r--src/uri/uri_udp_test.c15
2 files changed, 21 insertions, 15 deletions
diff --git a/src/uri/uri_tcp_test.c b/src/uri/uri_tcp_test.c
index b15fd6ced65..22f246e5925 100755
--- a/src/uri/uri_tcp_test.c
+++ b/src/uri/uri_tcp_test.c
@@ -262,7 +262,8 @@ vl_api_application_attach_reply_t_handler (vl_api_application_attach_reply_t *
}
utm->our_event_queue =
- (unix_shared_memory_queue_t *) mp->app_event_queue_address;
+ uword_to_pointer (mp->app_event_queue_address,
+ unix_shared_memory_queue_t *);
utm->state = STATE_ATTACHED;
}
@@ -524,8 +525,9 @@ vl_api_connect_uri_reply_t_handler (vl_api_connect_uri_reply_t * mp)
return;
}
- utm->vpp_event_queue = (unix_shared_memory_queue_t *)
- mp->vpp_event_queue_address;
+ utm->vpp_event_queue =
+ uword_to_pointer (mp->vpp_event_queue_address,
+ unix_shared_memory_queue_t *);
/*
* Setup session
@@ -534,9 +536,9 @@ vl_api_connect_uri_reply_t_handler (vl_api_connect_uri_reply_t * mp)
pool_get (utm->sessions, session);
session_index = session - utm->sessions;
- rx_fifo = (svm_fifo_t *) mp->server_rx_fifo;
+ rx_fifo = uword_to_pointer (mp->server_rx_fifo, svm_fifo_t *);
rx_fifo->client_session_index = session_index;
- tx_fifo = (svm_fifo_t *) mp->server_tx_fifo;
+ tx_fifo = uword_to_pointer (mp->server_tx_fifo, svm_fifo_t *);
tx_fifo->client_session_index = session_index;
session->server_rx_fifo = rx_fifo;
@@ -858,16 +860,17 @@ vl_api_accept_session_t_handler (vl_api_accept_session_t * mp)
ip_str = format (0, "%U", format_ip46_address, &mp->ip, mp->is_ip4);
clib_warning ("Accepted session from: %s:%d", ip_str,
clib_net_to_host_u16 (mp->port));
- utm->vpp_event_queue = (unix_shared_memory_queue_t *)
- mp->vpp_event_queue_address;
+ utm->vpp_event_queue =
+ uword_to_pointer (mp->vpp_event_queue_address,
+ unix_shared_memory_queue_t *);
/* Allocate local session and set it up */
pool_get (utm->sessions, session);
session_index = session - utm->sessions;
- rx_fifo = (svm_fifo_t *) mp->server_rx_fifo;
+ rx_fifo = uword_to_pointer (mp->server_rx_fifo, svm_fifo_t *);
rx_fifo->client_session_index = session_index;
- tx_fifo = (svm_fifo_t *) mp->server_tx_fifo;
+ tx_fifo = uword_to_pointer (mp->server_tx_fifo, svm_fifo_t *);
tx_fifo->client_session_index = session_index;
session->server_rx_fifo = rx_fifo;
diff --git a/src/uri/uri_udp_test.c b/src/uri/uri_udp_test.c
index 266215c847c..8fb12ed27a7 100644
--- a/src/uri/uri_udp_test.c
+++ b/src/uri/uri_udp_test.c
@@ -232,7 +232,8 @@ vl_api_application_attach_reply_t_handler (vl_api_application_attach_reply_t *
}
utm->our_event_queue =
- (unix_shared_memory_queue_t *) mp->app_event_queue_address;
+ uword_to_pointer (mp->app_event_queue_address,
+ unix_shared_memory_queue_t *);
}
static void
@@ -581,7 +582,8 @@ send_reply:
vec_free (a->segment_name);
- client_q = (unix_shared_memory_queue_t *) mp->client_queue_address;
+ client_q =
+ uword_to_pointer (mp->client_queue_address, unix_shared_memory_queue_t *);
vl_msg_api_send_shmem (client_q, (u8 *) & rmp);
}
@@ -608,14 +610,15 @@ vl_api_accept_session_t_handler (vl_api_accept_session_t * mp)
if (start_time == 0.0)
start_time = clib_time_now (&utm->clib_time);
- utm->vpp_event_queue = (unix_shared_memory_queue_t *)
- mp->vpp_event_queue_address;
+ utm->vpp_event_queue =
+ uword_to_pointer (mp->vpp_event_queue_address,
+ unix_shared_memory_queue_t *);
pool_get (utm->sessions, session);
- rx_fifo = (svm_fifo_t *) mp->server_rx_fifo;
+ rx_fifo = uword_to_pointer (mp->server_rx_fifo, svm_fifo_t *);
rx_fifo->client_session_index = session - utm->sessions;
- tx_fifo = (svm_fifo_t *) mp->server_tx_fifo;
+ tx_fifo = uword_to_pointer (mp->server_tx_fifo, svm_fifo_t *);
tx_fifo->client_session_index = session - utm->sessions;
session->server_rx_fifo = rx_fifo;