From 85aed392965d4397e8e689b8bba4968d627b297a Mon Sep 17 00:00:00 2001 From: zhanglianghy Date: Thu, 11 Jul 2019 11:50:54 +0800 Subject: [PATCH] =?UTF-8?q?MOD=20aaa-12=20=E4=BC=98=E5=8C=96rpc=20socket?= =?UTF-8?q?=E5=88=9B=E5=BB=BA=E8=B7=AF=E5=BE=84=20SOL=20=20=E4=BC=98?= =?UTF-8?q?=E5=8C=96rpc=20socket=E5=88=9B=E5=BB=BA=E8=B7=AF=E5=BE=84=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=BA=EF=BC=9Azhangliang=20=E6=A3=80?= =?UTF-8?q?=E8=A7=86=E4=BA=BA=EF=BC=9Azhangliang?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Platform/user/rpc/rpc_thread.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Platform/user/rpc/rpc_thread.c b/Platform/user/rpc/rpc_thread.c index 2c160eea4..5c81a76ab 100755 --- a/Platform/user/rpc/rpc_thread.c +++ b/Platform/user/rpc/rpc_thread.c @@ -161,8 +161,12 @@ boolean rpc_unix_socketc_get(char *host, int port, int*pcfd) socklen_t cliun_len; int sockfd; int len; + char socket_path[32]; - char *socket_path = CONFIGM_UNIX_SOCKET; + memset(socket_path, 0, 32); + snprintf(socket_path, 32, "%d.socket", port); + + //char *socket_path = CONFIGM_UNIX_SOCKET; if ((sockfd = socket(AF_UNIX, SOCK_STREAM, 0)) < 0) {