Changeset 74076 in vbox
- Timestamp:
- Sep 5, 2018 8:27:18 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/generic/http-curl.cpp
r74071 r74076 2036 2036 2037 2037 /* 2038 * Append or prepend the header.2038 * Appending to an existing list requires no cURL interaction. 2039 2039 */ 2040 2040 AssertCompile(RTHTTPADDHDR_F_FRONT != 0); 2041 if (!(fFlags & RTHTTPADDHDR_F_FRONT)) 2042 { 2043 bool const fDone = pThis->pHeaders != NULL; 2044 ASMCompilerBarrier(); /* aliasing paranoia */ 2045 2041 if ( !(fFlags & RTHTTPADDHDR_F_FRONT) 2042 && pThis->pHeaders != NULL) 2043 { 2046 2044 *pThis->ppHeadersTail = &pHdr->Core; 2047 2045 pThis->ppHeadersTail = &pHdr->Core.next; 2048 if (fDone) 2049 return rtHttpUpdateUserAgentHeader(pThis, pHdr); 2050 2051 /* Need to update curl about the new list head. */ 2052 } 2053 else 2054 { 2055 pHdr->Core.next = pThis->pHeaders; 2056 if (!pThis->pHeaders) 2057 pThis->ppHeadersTail = &pHdr->Core.next; 2058 } 2046 return rtHttpUpdateUserAgentHeader(pThis, pHdr); 2047 } 2048 2049 /* 2050 * When prepending or adding the first header we need to inform cURL 2051 * about the new list head. 2052 */ 2053 pHdr->Core.next = pThis->pHeaders; 2054 if (!pThis->pHeaders) 2055 pThis->ppHeadersTail = &pHdr->Core.next; 2059 2056 pThis->pHeaders = &pHdr->Core; 2060 2057
Note:
See TracChangeset
for help on using the changeset viewer.