Changeset 37688 in vbox
- Timestamp:
- Jun 29, 2011 3:26:05 PM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 72548
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Storage/ISCSI.cpp
r37176 r37688 5 5 6 6 /* 7 * Copyright (C) 2006-201 0Oracle Corporation7 * Copyright (C) 2006-2011 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 585 585 /** Pointer to the target hostname. */ 586 586 char *pszHostname; 587 /** Po inter to the target hostname. */587 /** Port to use on the target host. */ 588 588 uint32_t uPort; 589 589 /** Socket handle of the TCP connection. */ … … 911 911 return VERR_NO_MEMORY; 912 912 } 913 LogRel(("iSCSI: connect from initiator %s with source port %u\n", pImage->pszInitiatorName, pImage->ISID & 65535)); 913 914 return VINF_SUCCESS; 915 } 916 917 918 static int iscsiTransportClose(PISCSIIMAGE pImage) 919 { 920 int rc; 921 922 LogFlowFunc(("(%s:%d)\n", pImage->pszHostname, pImage->uPort)); 923 if (iscsiIsClientConnected(pImage)) 924 { 925 LogRel(("iSCSI: disconnect from initiator %s with source port %u\n", pImage->pszInitiatorName, pImage->ISID & 65535)); 926 rc = pImage->pInterfaceNetCallbacks->pfnClientClose(pImage->Socket); 927 } 928 else 929 rc = VINF_SUCCESS; 930 LogFlowFunc(("returns %Rrc\n", rc)); 931 return rc; 914 932 } 915 933 … … 958 976 { 959 977 /* The other end has closed the connection. */ 960 pImage->pInterfaceNetCallbacks->pfnClientClose(pImage->Socket);978 iscsiTransportClose(pImage); 961 979 pImage->state = ISCSISTATE_FREE; 962 980 rc = VERR_NET_CONNECTION_RESET; … … 1116 1134 1117 1135 /* Clean up previous connection data. */ 1118 if (iscsiIsClientConnected(pImage)) 1119 { 1120 pImage->pInterfaceNetCallbacks->pfnClientClose(pImage->Socket); 1121 } 1136 iscsiTransportClose(pImage); 1122 1137 if (pImage->pszHostname) 1123 1138 { … … 1207 1222 } 1208 1223 1209 LogFlowFunc(("returns %Rrc\n", rc));1210 return rc;1211 }1212 1213 1214 static int iscsiTransportClose(PISCSIIMAGE pImage)1215 {1216 int rc;1217 1218 LogFlowFunc(("(%s:%d)\n", pImage->pszHostname, pImage->uPort));1219 if (iscsiIsClientConnected(pImage))1220 {1221 rc = pImage->pInterfaceNetCallbacks->pfnClientClose(pImage->Socket);1222 }1223 else1224 rc = VINF_SUCCESS;1225 1224 LogFlowFunc(("returns %Rrc\n", rc)); 1226 1225 return rc;
Note:
See TracChangeset
for help on using the changeset viewer.