]> git.openfabrics.org - ~shefty/librdmacm.git/commitdiff
Refresh of dbg-fork
authorSean Hefty <sean.hefty@intel.com>
Wed, 22 Aug 2012 22:36:51 +0000 (15:36 -0700)
committerSean Hefty <sean.hefty@intel.com>
Wed, 22 Aug 2012 22:36:51 +0000 (15:36 -0700)
src/preload.c

index fba02819f13ca37124384f4bacea4bb57fcf4c37..d1d8b06c416cc99dd453455ac81a18edf4146565 100644 (file)
@@ -413,9 +413,13 @@ int socket(int domain, int type, int protocol)
        if (index < 0)
                return index;
 
+       if ((domain == PF_INET || domain == PF_INET6) &&
+           (type == SOCK_STREAM) && (!protocol || protocol == IPPROTO_TCP) && fork_support) {
+               printf("skipping rsocket call\n");
+               goto realsock;
+       }
+
        recursive = 1;
-printf("skipping rsocket call\n");
-goto realsock;
        ret = rsocket(domain, type, protocol);
        recursive = 0;
        if (ret >= 0) {