<html><head><meta http-equiv="content-type" content="text/html; charset=GB2312"><style>body { line-height: 1.5; }blockquote { margin-top: 0px; margin-bottom: 0px; margin-left: 0.5em; }div.foxdiv20170510100018487078 { }body { font-size: 10.5pt; font-family: 'Microsoft YaHei UI'; color: rgb(0, 0, 0); line-height: 1.5; }</style></head><body>
<div><span></span><br></div>
<div><br></div><hr style="WIDTH: 210px; HEIGHT: 1px" color="#b5c4df" size="1" align="left">
<div><span><div style="MARGIN: 10px; FONT-FAMILY: verdana; FONT-SIZE: 10pt"><div>16120054@bjtu.edu.cn</div></div></span></div>
<blockquote style="margin-top: 0px; margin-bottom: 0px; margin-left: 0.5em;"><div> </div><div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm"><div style="PADDING-RIGHT: 8px; PADDING-LEFT: 8px; FONT-SIZE: 12px;FONT-FAMILY:tahoma;COLOR:#000000; BACKGROUND: #efefef; PADDING-BOTTOM: 8px; PADDING-TOP: 8px"><div><b>发件人:</b> <a href="mailto:16120054@bjtu.edu.cn">16120054@bjtu.edu.cn</a></div><div><b>发送时间:</b> 2017-05-10 09:29</div><div><b>收件人:</b> <a href="mailto:nfd-dev@lists.cs.ucla.edu">nfd-dev</a></div><div><b>主题:</b> Problems</div></div></div><div><div class="FoxDiv20170510100018487078"> 
<font face="Tahoma">Hello!</font><div><font face="Tahoma">    I add a data parket field in the data.cpp ,such as</font></div><div><font face="Tahoma">  </font><span style="background-color: rgba(0, 0, 0, 0); font-family: Tahoma; font-size: 10.5pt; line-height: 1.5;">template<encoding::Tag TAG></span></div><span style="font-family: Tahoma; color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0);">size_t<br>Data::wireEncode(EncodingImpl<TAG>& encoder, bool unsignedPortion/* = false*/) const<br>{<br>  size_t totalLength = 0;<br><br>  // Data ::= DATA-TLV TLV-LENGTH<br>  //            Name<br>  //            MetaInfo<br>  //            Content<br>  //            Signature<br>  //<span style="white-space: pre;">        </span>        Digest<br><br>  // (reverse encoding)<br><br>  if (!unsignedPortion && !m_signature)<br>  {<br>      BOOST_THROW_EXCEPTION(Error("Requested wire format, but data packet has not been signed yet"));<br>  }<br><br>  // Digest<br>  totalLength += encoder.prependBlock(getDigest());<br><br>  if (!unsignedPortion)<br>  {<br>      // SignatureValue<br>      totalLength += encoder.prependBlock(m_signature.getValue());<br>  }<br><br>  // SignatureInfo<br>  totalLength += encoder.prependBlock(m_signature.getInfo());<br><br>  // Content<br>  totalLength += encoder.prependBlock(getContent());<br><br>  // MetaInfo<br>  totalLength += getMetaInfo().wireEncode(encoder);<br><br>  // Name<br>  totalLength += getName().wireEncode(encoder);<br><br><br>  if (!unsignedPortion)<br>    {<br>      totalLength += encoder.prependVarNumber(totalLength);<br>      totalLength += encoder.prependVarNumber(tlv::Data);<br>    }<br>  return totalLength;<br>}</span><div><font face="Tahoma"><br></font></div><div><font face="Tahoma">  </font><span style="font-family: Tahoma; color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0);">const Block&<br>Data::getDigest() const<br>{<br>  if (m_fullName1.empty())<br>    m_fullName1 = makeEmptyBlock(tlv::Digest);<br><br>  if (!m_fullName1.hasWire())<br>    m_fullName1.encode();<br>  return m_fullName1;<br>}<br><br>Data&<br>Data::setDigest(const Block& fullname)<br>{<br>  onChanged();<br>  if (fullname.type() == tlv::Digest)<br>      m_fullName1 = fullname;<br>  else {<br>       m_fullName1 = Block(tlv::Digest, fullname);<br>  }<br>  return *this;<br>}<br><br><br>Data&<br>Data::setDigest(const uint8_t* fullname, size_t fullnameLength)<br>{<br>   onChanged();<br><br>   m_fullName1 = makeBinaryBlock(tlv::Digest, fullname, fullnameLength);<br><br>   return *this;<br> }</span></div><div><font face="Tahoma"><br></font></div><div><font face="Tahoma"><br></font></div><div><font face="Tahoma"> But, program always shows that "</font><span style="font-family: Tahoma; color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0);">terminated with signal SIGSEGV",I don't konw how to solve it.</span><font face="Tahoma"><br></font><div style="FONT-FAMILY: Tahoma"><br></div><div style="FONT-FAMILY: Tahoma"><br></div>
<div></div>
<div><hr align="left" color="#b5c4df" size="1" style="font-size: 14px; line-height: 21px; width: 210px; height: 1px;"><div style="font-size: 14px; line-height: 21px;"><div style="font-family: 'Microsoft YaHei UI', Tahoma; line-height: normal;"><div>研究生</div><div>下一代互联网国家工程实验室</div></div><div style="font-family: 'Microsoft YaHei UI', Tahoma; line-height: normal;">北京交通大学</div><div style="font-family: 'Microsoft YaHei UI', Tahoma; line-height: normal;">寸怡鹏</div><div style="font-family: 'Microsoft YaHei UI', Tahoma; line-height: normal;"><br></div><div style="font-family: 'Microsoft YaHei UI', Tahoma; line-height: normal;">Mob: (+86) 13238752918</div><div style="font-family: 'Microsoft YaHei UI', Tahoma; line-height: normal;">Email: <span style="font-family: tahoma, verdana, sans-serif; font-size: 12px;"><a href="mailto:16120168@bjtu.edu.cn" class="" style="text-decoration: none !important;">cunyipeng@bjtu.edu.cn</a></span></div></div></div>
</div></div></div></blockquote>
</body></html>