X-Git-Url: https://git.lttng.org/?p=lttng-ust.git;a=blobdiff_plain;f=src%2Fcommon%2Fustcomm.c;h=319e84ac923530d790de9afd22ba595849399e31;hp=6e6b8f3e564e8a5823a98d16b382f44fa0a1bf53;hb=c117e9884c3acc65408d8f65b2cd86a8511df1cc;hpb=d2a010d1e67e246e8ab4a847b8bbbdbce2b4e2d7 diff --git a/src/common/ustcomm.c b/src/common/ustcomm.c index 6e6b8f3e..319e84ac 100644 --- a/src/common/ustcomm.c +++ b/src/common/ustcomm.c @@ -803,7 +803,8 @@ int ustcomm_send_reg_msg(int sock, uint32_t uint16_t_alignment, uint32_t uint32_t_alignment, uint32_t uint64_t_alignment, - uint32_t long_alignment) + uint32_t long_alignment, + const char *procname) { ssize_t len; struct lttng_ust_ctl_reg_msg reg_msg; @@ -822,7 +823,8 @@ int ustcomm_send_reg_msg(int sock, reg_msg.uint64_t_alignment = uint64_t_alignment; reg_msg.long_alignment = long_alignment; reg_msg.socket_type = type; - lttng_pthread_getname_np(reg_msg.name, LTTNG_UST_ABI_PROCNAME_LEN); + memset(reg_msg.name, 0, sizeof(reg_msg.name)); + strncpy(reg_msg.name, procname, sizeof(reg_msg.name) - 1); memset(reg_msg.padding, 0, sizeof(reg_msg.padding)); len = ustcomm_send_unix_sock(sock, ®_msg, sizeof(reg_msg));