MCPcopy Create free account
hub / github.com/apache/brpc / SkipAMFObjectBody

Function SkipAMFObjectBody

src/brpc/amf.cpp:529–550  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

527}
528
529static bool SkipAMFObjectBody(AMFInputStream* stream) {
530 std::string name;
531 while (ReadAMFShortStringBody(&name, stream)) {
532 if (name.empty()) {
533 uint8_t marker;
534 if (stream->cut_u8(&marker) != 1u) {
535 LOG(ERROR) << "stream is not long enough";
536 return false;
537 }
538 if ((AMFMarker)marker != AMF_MARKER_OBJECT_END) {
539 LOG(ERROR) << "marker=" << marker
540 << " after empty name is not object end";
541 return false;
542 }
543 break;
544 }
545 if (!ReadAMFObjectField(stream, NULL, NULL)) {
546 return false;
547 }
548 }
549 return true;
550}
551
552static bool ReadAMFEcmaArrayBody(google::protobuf::Message* message,
553 AMFInputStream* stream) {

Callers 1

ReadAMFObjectFieldFunction · 0.85

Calls 4

ReadAMFShortStringBodyFunction · 0.85
ReadAMFObjectFieldFunction · 0.85
cut_u8Method · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected