Loading isis/src/control/objs/ControlNetVersioner/ControlNetFileV0002.cpp +6 −4 Original line number Diff line number Diff line Loading @@ -73,7 +73,7 @@ namespace Isis { // Now stream the rest of the input into the google protocol buffer. try { filePos += headerLength; int oldLimit = headerCodedInStream.PushLimit(headerLength); CodedInputStream::Limit oldLimit = headerCodedInStream.PushLimit(headerLength); if (!p_networkHeader->ParseFromCodedStream(&headerCodedInStream)) { IString msg = "Failed to read input control net file [" + file.name() + "]"; Loading @@ -86,6 +86,9 @@ namespace Isis { // choose 64 MB as a safe amount int streamThreshold = 1024 * 1024 * 64; int currentStreamSize = 0; // For some reason, reading the header causes the input stream to fail so reopen the file input.close(); input.open(file.expanded().toLatin1().data(), ios::in | ios::binary); input.seekg(filePos, ios::beg); IstreamInputStream *pointInStream = new IstreamInputStream(&input); CodedInputStream *pointCodedInStream = new CodedInputStream(pointInStream); Loading Loading @@ -565,4 +568,3 @@ namespace Isis { return pvl; } } Loading
isis/src/control/objs/ControlNetVersioner/ControlNetFileV0002.cpp +6 −4 Original line number Diff line number Diff line Loading @@ -73,7 +73,7 @@ namespace Isis { // Now stream the rest of the input into the google protocol buffer. try { filePos += headerLength; int oldLimit = headerCodedInStream.PushLimit(headerLength); CodedInputStream::Limit oldLimit = headerCodedInStream.PushLimit(headerLength); if (!p_networkHeader->ParseFromCodedStream(&headerCodedInStream)) { IString msg = "Failed to read input control net file [" + file.name() + "]"; Loading @@ -86,6 +86,9 @@ namespace Isis { // choose 64 MB as a safe amount int streamThreshold = 1024 * 1024 * 64; int currentStreamSize = 0; // For some reason, reading the header causes the input stream to fail so reopen the file input.close(); input.open(file.expanded().toLatin1().data(), ios::in | ios::binary); input.seekg(filePos, ios::beg); IstreamInputStream *pointInStream = new IstreamInputStream(&input); CodedInputStream *pointCodedInStream = new CodedInputStream(pointInStream); Loading Loading @@ -565,4 +568,3 @@ namespace Isis { return pvl; } }