X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fcommon%2Fustcomm.c;h=252ed4f26e9f94875b050a4c7317aa2d246731fc;hb=2137460a3901f8abdae909cf72e43e6ac23507ec;hp=6e6b8f3e564e8a5823a98d16b382f44fa0a1bf53;hpb=b2be0f7bf1550b80316ec3703dbd9effdb1759dd;p=lttng-ust.git diff --git a/src/common/ustcomm.c b/src/common/ustcomm.c index 6e6b8f3e..252ed4f2 100644 --- a/src/common/ustcomm.c +++ b/src/common/ustcomm.c @@ -1,7 +1,7 @@ /* * SPDX-License-Identifier: LGPL-2.1-only * - * Copyright (C) 2011 David Goulet + * Copyright (C) 2011 EfficiOS Inc. * Copyright (C) 2011-2013 Mathieu Desnoyers */ @@ -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)); @@ -1725,7 +1727,7 @@ int ustcomm_register_channel(int sock, } /* - * Set socket reciving timeout. + * Set socket receiving timeout. */ int ustcomm_setsockopt_rcv_timeout(int sock, unsigned int msec) {