Commit 0a5eba11 authored by Philip Carns's avatar Philip Carns

bug fix

parent 95760879
...@@ -91,8 +91,13 @@ int main(int argc, char **argv) ...@@ -91,8 +91,13 @@ int main(int argc, char **argv)
buffer = calloc(1, buffer_sz); buffer = calloc(1, buffer_sz);
assert(buffer); assert(buffer);
printf("DBG: calling data_xfer_read.\n");
data_xfer_read(mid, svr_addr, buffer, buffer_sz); data_xfer_read(mid, svr_addr, buffer, buffer_sz);
printf("DBG: ... DONE.\n");
printf("DBG: calling composed_read.\n");
composed_read(mid, svr_addr, buffer, buffer_sz); composed_read(mid, svr_addr, buffer, buffer_sz);
printf("DBG: ... DONE.\n");
/* send one rpc to server to shut it down */ /* send one rpc to server to shut it down */
/* create handle */ /* create handle */
......
...@@ -72,12 +72,28 @@ DEFINE_MARGO_RPC_HANDLER(delegator_read_ult) ...@@ -72,12 +72,28 @@ DEFINE_MARGO_RPC_HANDLER(delegator_read_ult)
int delegator_service_register(margo_instance_id mid, ABT_pool pool, uint32_t mplex_id, hg_addr_t data_xfer_svc_addr) int delegator_service_register(margo_instance_id mid, ABT_pool pool, uint32_t mplex_id, hg_addr_t data_xfer_svc_addr)
{ {
int hret;
hg_id_t id;
hg_bool_t flag;
/* save addr to relay to */ /* save addr to relay to */
g_data_xfer_svc_addr = data_xfer_svc_addr; g_data_xfer_svc_addr = data_xfer_svc_addr;
/* register client-side of function to relay */ /* register client-side of function to relay */
/* TODO: make this safe; right now if we register again as a client we lose the RPC
* handler ptr
*/
hret = HG_Registered_name(margo_get_class(mid), "data_xfer_read", &id, &flag);
assert(hret == HG_SUCCESS);
if(!flag)
{
g_data_xfer_read_id = MERCURY_REGISTER(margo_get_class(mid), "data_xfer_read", g_data_xfer_read_id = MERCURY_REGISTER(margo_get_class(mid), "data_xfer_read",
data_xfer_read_in_t, data_xfer_read_out_t, NULL); data_xfer_read_in_t, data_xfer_read_out_t, NULL);
}
else
{
g_data_xfer_read_id = id;
}
/* register RPC handler */ /* register RPC handler */
MARGO_REGISTER(mid, "delegator_read", delegator_read_in_t, delegator_read_out_t, delegator_read_ult_handler, mplex_id, pool); MARGO_REGISTER(mid, "delegator_read", delegator_read_in_t, delegator_read_out_t, delegator_read_ult_handler, mplex_id, pool);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment