Commit eb14b045 authored by Shane Snyder's avatar Shane Snyder
Browse files

bug fix in serialization of group ids

parent ff5d027c
...@@ -667,7 +667,7 @@ void ssg_group_id_serialize( ...@@ -667,7 +667,7 @@ void ssg_group_id_serialize(
{ {
ssg_group_descriptor_t *group_descriptor = (ssg_group_descriptor_t *)group_id; ssg_group_descriptor_t *group_descriptor = (ssg_group_descriptor_t *)group_id;
size_t alloc_size; size_t alloc_size;
char *gid_buf; char *gid_buf, *p;
*buf_p = NULL; *buf_p = NULL;
*buf_size_p = 0; *buf_size_p = 0;
...@@ -681,12 +681,12 @@ void ssg_group_id_serialize( ...@@ -681,12 +681,12 @@ void ssg_group_id_serialize(
return; return;
/* serialize */ /* serialize */
*(uint64_t *)gid_buf = group_descriptor->magic_nr; p = gid_buf;
gid_buf += sizeof(uint64_t); *(uint64_t *)p = group_descriptor->magic_nr;
*(uint64_t *)gid_buf = group_descriptor->name_hash; p += sizeof(uint64_t);
gid_buf += sizeof(uint64_t); *(uint64_t *)p = group_descriptor->name_hash;
strcpy(gid_buf, group_descriptor->addr_str); p += sizeof(uint64_t);
gid_buf += strlen(group_descriptor->addr_str) + 1; strcpy(p, group_descriptor->addr_str);
/* the rest of the descriptor is stateful and not appropriate for serializing... */ /* the rest of the descriptor is stateful and not appropriate for serializing... */
*buf_p = gid_buf; *buf_p = gid_buf;
......
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