From: Sean Hefty Date: Tue, 14 Aug 2012 23:44:49 +0000 (-0700) Subject: Refresh of dbg-out X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=6654fe18b802ac428d8e64d5448cc3656efd4a30;p=~shefty%2Flibrdmacm.git Refresh of dbg-out --- diff --git a/src/preload.c b/src/preload.c index b2cbb78f..ac36642c 100644 --- a/src/preload.c +++ b/src/preload.c @@ -411,17 +411,16 @@ int socket(int domain, int type, int protocol) static __thread int recursive; int index, ret; - fprintf(fout, "%d socket\n", (int)syscall(SYS_gettid)); if (recursive) goto real; init_preload(); + fprintf(fout, "%d socket\n", (int)syscall(SYS_gettid)); index = fd_open(); if (index < 0) return index; - fprintf(fout, "%d socket %d\n", (int)syscall(SYS_gettid), index); - fflush(fout); + fprintf(fout, "%d socket %d\n", (int)syscall(SYS_gettid), index); fflush(fout); recursive = 1; ret = rsocket(domain, type, protocol); recursive = 0; @@ -449,8 +448,7 @@ real: int bind(int socket, const struct sockaddr *addr, socklen_t addrlen) { int fd; - fprintf(fout, "%d bind %d\n", (int)syscall(SYS_gettid), socket); - fflush(fout); + fprintf(fout, "%d bind %d\n", (int)syscall(SYS_gettid), socket); fflush(fout); return (fd_get(socket, &fd) == fd_rsocket) ? rbind(fd, addr, addrlen) : real.bind(fd, addr, addrlen); } @@ -1074,7 +1072,7 @@ ssize_t sendfile(int out_fd, int in_fd, off_t *offset, size_t count) int __fxstat64(int ver, int socket, struct stat64 *buf) { -// int fd, ret; + int fd, ret; init_preload(); fprintf(fout, "%s\n", __func__); fflush(fout);