From b04f9f301cdbcd8278bec85778ed8fcb0599eda9 Mon Sep 17 00:00:00 2001 From: netblue30 Date: Sat, 13 Feb 2016 09:29:20 -0500 Subject: --trace fix --- src/libtrace/libtrace.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/libtrace/libtrace.c b/src/libtrace/libtrace.c index edd409af5..0e6e6c83d 100644 --- a/src/libtrace/libtrace.c +++ b/src/libtrace/libtrace.c @@ -500,11 +500,15 @@ int socket(int domain, int type, int protocol) { else ptr += sprintf(ptr, "%s ", str); - str = translate(socket_protocol, protocol); - if (str == NULL) - sprintf(ptr, "%d", protocol); - else - sprintf(ptr, "%s", str); + if (domain == AF_LOCAL) + sprintf(ptr, "0"); + else { + str = translate(socket_protocol, protocol); + if (str == NULL) + sprintf(ptr, "%d", protocol); + else + sprintf(ptr, "%s", str); + } printf("%s:%d\n", buf, rv); return rv; -- cgit v1.2.3-70-g09d2