Changeset 87072 in vbox for trunk/src/VBox
- Timestamp:
- Dec 9, 2020 4:51:00 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/SharedClipboard/clipboard-transfers-http.cpp
r87068 r87072 70 70 * Prototypes * 71 71 *********************************************************************************************************************************/ 72 int ShClTransferHttpServerDestroyInternal(PSHCLHTTPSERVER pThis);72 int shClTransferHttpServerDestroyInternal(PSHCLHTTPSERVER pThis); 73 73 74 74 … … 105 105 static int shClTransferHttpPathValidate(PSHCLHTTPSERVER pThis, const char *pszUrl) 106 106 { 107 AssertPtrReturn(pszUrl, VERR_INVALID_POINTER); 108 109 int rc = VERR_PATH_NOT_FOUND; 110 107 111 PSHCLHTTPSERVERTRANSFER pSrvTx; 108 112 RTListForEach(&pThis->lstTransfers, pSrvTx, SHCLHTTPSERVERTRANSFER, Node) 109 113 { 110 114 AssertPtr(pSrvTx->pTransfer); 115 116 const char *psz = pszUrl; 117 111 118 /* Be picky here, do a case sensitive comparison. */ 112 if (RTStrStartsWith(pszUrl, pSrvTx->szPathVirtual)) 113 return VINF_SUCCESS; 114 } 115 116 return VERR_PATH_NOT_FOUND; 117 } 118 119 if (RTStrStartsWith(psz, pSrvTx->szPathVirtual)) 120 { 121 /* Skip the virtual root path. */ 122 psz += RTStrNLen(pSrvTx->szPathVirtual, RTPATH_MAX); 123 124 125 126 LogFlowFunc(("psz=%s\n", psz)); 127 128 rc = VINF_SUCCESS; 129 break; 130 } 131 } 132 133 LogFlowFunc(("pszUrl=%s, rc=%Rrc\n", pszUrl, rc)); 134 return rc; 135 } 136 137 /** @copydoc RTHTTPSERVERCALLBACKS::pfnOpen */ 119 138 static DECLCALLBACK(int) shClTransferHttpOpen(PRTHTTPCALLBACKDATA pData, PRTHTTPSERVERREQ pReq, void **ppvHandle) 120 139 { … … 132 151 } 133 152 153 /** @copydoc RTHTTPSERVERCALLBACKS::pfnRead */ 134 154 static DECLCALLBACK(int) shClTransferHttpRead(PRTHTTPCALLBACKDATA pData, void *pvHandle, void *pvBuf, size_t cbBuf, size_t *pcbRead) 135 155 { … … 145 165 } 146 166 167 /** @copydoc RTHTTPSERVERCALLBACKS::pfnClose */ 147 168 static DECLCALLBACK(int) shClTransferHttpClose(PRTHTTPCALLBACKDATA pData, void *pvHandle) 148 169 { … … 158 179 } 159 180 181 /** @copydoc RTHTTPSERVERCALLBACKS::pfnQueryInfo */ 160 182 static DECLCALLBACK(int) shClTransferHttpQueryInfo(PRTHTTPCALLBACKDATA pData, 161 183 PRTHTTPSERVERREQ pReq, PRTFSOBJINFO pObjInfo, char **ppszMIMEHint) … … 174 196 } 175 197 198 /** @copydoc RTHTTPSERVERCALLBACKS::pfnDestroy */ 176 199 static DECLCALLBACK(int) shClTransferHttpDestroy(PRTHTTPCALLBACKDATA pData) 177 200 { … … 179 202 Assert(pData->cbUser == sizeof(SHCLHTTPSERVER)); 180 203 181 return ShClTransferHttpServerDestroyInternal(pThis);204 return shClTransferHttpServerDestroyInternal(pThis); 182 205 } 183 206
Note:
See TracChangeset
for help on using the changeset viewer.