Commit b2fb8474 authored by Philip Carns's avatar Philip Carns

update addr string management

- match updated convention in Mercury master: HG_Addr_to_string() result
includes protocol prefix without us manually adding it
parent 5df15cc4
......@@ -58,8 +58,6 @@ int main(int argc, char **argv)
margo_instance_id mid;
hg_context_t *hg_context;
hg_class_t *hg_class;
char proto[12] = {0};
int i;
hg_addr_t addr_self;
char addr_self_string[128];
hg_size_t addr_self_string_sz = 128;
......@@ -113,9 +111,7 @@ int main(int argc, char **argv)
}
HG_Addr_free(hg_class, addr_self);
for(i=0; i<11 && argv[1][i] != '\0' && argv[1][i] != ':'; i++)
proto[i] = argv[1][i];
printf("# accepting RPCs on address \"%s://%s\"\n", proto, addr_self_string);
printf("# accepting RPCs on address \"%s\"\n", addr_self_string);
/* set up argobots */
/***************************************/
......
......@@ -23,8 +23,6 @@ int main(int argc, char **argv)
margo_instance_id mid;
hg_context_t *hg_context;
hg_class_t *hg_class;
char proto[12] = {0};
int i;
hg_addr_t addr_self;
char addr_self_string[128];
hg_size_t addr_self_string_sz = 128;
......@@ -73,9 +71,7 @@ int main(int argc, char **argv)
}
HG_Addr_free(hg_class, addr_self);
for(i=0; i<11 && argv[1][i] != '\0' && argv[1][i] != ':'; i++)
proto[i] = argv[1][i];
printf("# accepting RPCs on address \"%s://%s\"\n", proto, addr_self_string);
printf("# accepting RPCs on address \"%s\"\n", addr_self_string);
/* set up argobots */
/***************************************/
......
......@@ -55,8 +55,6 @@ int main(int argc, char **argv)
margo_instance_id mid;
hg_context_t *hg_context;
hg_class_t *hg_class;
char proto[12] = {0};
int i;
hg_addr_t addr_self;
char addr_self_string[128];
hg_size_t addr_self_string_sz = 128;
......@@ -107,9 +105,7 @@ int main(int argc, char **argv)
}
HG_Addr_free(hg_class, addr_self);
for(i=0; i<11 && argv[1][i] != '\0' && argv[1][i] != ':'; i++)
proto[i] = argv[1][i];
printf("# accepting RPCs on address \"%s://%s\"\n", proto, addr_self_string);
printf("# accepting RPCs on address \"%s\"\n", addr_self_string);
/* set up argobots */
/***************************************/
......
......@@ -59,8 +59,6 @@ int main(int argc, char **argv)
if(opts.hostfile)
{
FILE *fp;
char proto[12] = {0};
int i;
hg_addr_t addr_self;
char addr_self_string[128];
hg_size_t addr_self_string_sz = 128;
......@@ -95,9 +93,7 @@ int main(int argc, char **argv)
return(-1);
}
for(i=0; i<11 && opts.listen_addr[i] != '\0' && opts.listen_addr[i] != ':'; i++)
proto[i] = opts.listen_addr[i];
fprintf(fp, "%s://%s", proto, addr_self_string);
fprintf(fp, "%s", addr_self_string);
fclose(fp);
}
......
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