Changeset 64894 in vbox for trunk/src/VBox/Runtime/common
- Timestamp:
- Dec 16, 2016 12:43:05 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/asn1/asn1-ut-core.cpp
r62564 r64894 179 179 180 180 181 /** 182 * @interface_method_impl{RTASN1COREVTABLE,pfnEncodePrep, 183 * This is for not dropping the unparsed content of a 'core' structure when 184 * re-encoding it. } 185 */ 186 static DECLCALLBACK(int) rtAsn1Core_EncodePrep(PRTASN1CORE pThisCore, uint32_t fFlags, PRTERRINFO pErrInfo) 187 { 188 /* We don't update anything here. */ 189 RT_NOREF(pThisCore, fFlags, pErrInfo); 190 return VINF_SUCCESS; 191 } 192 193 194 /** 195 * @interface_method_impl{RTASN1COREVTABLE,pfnEncodeWrite, 196 * This is for not dropping the unparsed content of a 'core' structure when 197 * re-encoding it. } 198 */ 199 static DECLCALLBACK(int) rtAsn1Core_EncodeWrite(PRTASN1CORE pThisCore, uint32_t fFlags, PFNRTASN1ENCODEWRITER pfnWriter, 200 void *pvUser, PRTERRINFO pErrInfo) 201 { 202 int rc = RTAsn1EncodeWriteHeader(pThisCore, fFlags, pfnWriter, pvUser, pErrInfo); 203 if (RT_SUCCESS(rc) && rc != VINF_ASN1_NOT_ENCODED) 204 { 205 Assert(!RTASN1CORE_IS_DUMMY(pThisCore)); 206 AssertPtrReturn(pThisCore->uData.pv, 207 RTErrInfoSetF(pErrInfo, VERR_ASN1_INVALID_DATA_POINTER, 208 "Invalid uData pointer %p for lone ASN.1 core with %#x bytes of content", 209 pThisCore->uData.pv, pThisCore->cb)); 210 rc = pfnWriter(pThisCore->uData.pv, pThisCore->cb, pvUser, pErrInfo); 211 } 212 return rc; 213 } 214 215 181 216 182 217 /* 183 218 * ASN.1 Core - Standard Methods. 184 219 * 185 * Note!Children of the ASN.1 Core doesn't normally call these, they are for220 * @note Children of the ASN.1 Core doesn't normally call these, they are for 186 221 * when RTASN1CORE is used as a member type. 187 222 */ … … 199 234 (PFNRTASN1COREVTCOMPARE)RTAsn1Core_Compare, 200 235 (PFNRTASN1COREVTCHECKSANITY)RTAsn1Core_CheckSanity, 201 NULL,202 NULL236 rtAsn1Core_EncodePrep, 237 rtAsn1Core_EncodeWrite 203 238 }; 204 239
Note:
See TracChangeset
for help on using the changeset viewer.