]> git.openfabrics.org - ~shefty/rdma-win.git/commitdiff
[WSD] Fixed building with IBSP_LOGGING enabled.
authortzachid <tzachid@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Thu, 22 Jun 2006 07:03:23 +0000 (07:03 +0000)
committertzachid <tzachid@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Thu, 22 Jun 2006 07:03:23 +0000 (07:03 +0000)
git-svn-id: svn://openib.tc.cornell.edu/gen1@389 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

trunk/ulp/wsd/user/ibspdebug.h
trunk/ulp/wsd/user/ibspdll.c
trunk/ulp/wsd/user/ibspstruct.h

index 2b02051048f72bdc09f9aaf212c56c84a4b8540c..44ba882b705abcfa056a9cd4c6636e59233fa2c1 100644 (file)
@@ -29,6 +29,9 @@
  * $Id$\r
  */\r
 \r
+#ifndef IBSPDEBUG_H\r
+#define IBSPDEBUG_H\r
+\r
 #include "ibspdll.h"\r
 #include <complib/cl_atomic.h>\r
 \r
@@ -169,3 +172,4 @@ VOID DataLogger_Shutdown(
                                        DataLogger                                      *pLoger );\r
 \r
 #endif /* IBSP_LOGGING */\r
+#endif /* IBSPDEBUG_H  */\r
index 9e489735d9398696c2a92167e4b78a3283eb6c63..55c557a1a3ea2ffb941db221ee961ca011db1bc7 100644 (file)
@@ -2264,4 +2264,39 @@ WSPStartupEx(
        return 0;\r
 }\r
 \r
+inline void\r
+ibsp_css(\r
+                                       char                                            *calling_func,\r
+                                       int                                                     line,\r
+                                       struct ibsp_socket_info         *s,\r
+                                       enum ibsp_socket_state          new_state )\r
+{\r
+       enum ibsp_socket_state old_state;\r
+\r
+       UNUSED_PARAM( calling_func );\r
+       UNUSED_PARAM( line );\r
+\r
+       old_state = s->socket_state;\r
+\r
+       if( old_state == new_state )\r
+       {\r
+               /* Nothing to change */\r
+               return;\r
+       }\r
+\r
+       /* IBSP_CLOSED is a dead end state */\r
+       if( old_state == IBSP_CLOSED )\r
+       {\r
+               fzprint(("%s():0x%x:0x%x: socket=0x%p cannot change from %s to %s, called by %s():%d\n", __FUNCTION__, GetCurrentProcessId(), GetCurrentThreadId(), s, IBSP_SOCKET_STATE_STR(old_state), IBSP_SOCKET_STATE_STR(new_state), calling_func, line));\r
+               return;\r
+       }\r
+\r
+       fzprint(("%s():0x%x:0x%x: socket=0x%p %s to %s, called by %s():%d\n", __FUNCTION__,\r
+                        GetCurrentProcessId(),\r
+                        GetCurrentThreadId(), s,\r
+                        IBSP_SOCKET_STATE_STR(old_state),\r
+                        IBSP_SOCKET_STATE_STR(new_state), calling_func, line));\r
+\r
+       s->socket_state = new_state;\r
+}\r
 \r
index 76c9550069b9896d074bd9e3bb877a242af3ed4e..2d2bb99d54e6ebcb448f5b874ac229ae238635a2 100644 (file)
@@ -334,36 +334,7 @@ ibsp_css(
                                        char                                            *calling_func,\r
                                        int                                                     line,\r
                                        struct ibsp_socket_info         *s,\r
-                                       enum ibsp_socket_state          new_state )\r
-{\r
-       enum ibsp_socket_state old_state;\r
-\r
-       UNUSED_PARAM( calling_func );\r
-       UNUSED_PARAM( line );\r
-\r
-       old_state = s->socket_state;\r
-\r
-       if( old_state == new_state )\r
-       {\r
-               /* Nothing to change */\r
-               return;\r
-       }\r
-\r
-       /* IBSP_CLOSED is a dead end state */\r
-       if( old_state == IBSP_CLOSED )\r
-       {\r
-               fzprint(("%s():0x%x:0x%x: socket=0x%p cannot change from %s to %s, called by %s():%d\n", __FUNCTION__, GetCurrentProcessId(), GetCurrentThreadId(), s, IBSP_SOCKET_STATE_STR(old_state), IBSP_SOCKET_STATE_STR(new_state), calling_func, line));\r
-               return;\r
-       }\r
-\r
-       fzprint(("%s():0x%x:0x%x: socket=0x%p %s to %s, called by %s():%d\n", __FUNCTION__,\r
-                        GetCurrentProcessId(),\r
-                        GetCurrentThreadId(), s,\r
-                        IBSP_SOCKET_STATE_STR(old_state),\r
-                        IBSP_SOCKET_STATE_STR(new_state), calling_func, line));\r
-\r
-       s->socket_state = new_state;\r
-}\r
+                                       enum ibsp_socket_state          new_state );\r
 \r
 #define IBSP_CHANGE_SOCKET_STATE(socket_info, new_state) \\r
        ibsp_css(__FUNCTION__, __LINE__, socket_info, new_state)\r