Browse Source

2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>

	Changed the type of padName from `const std::string&' to `const 
char*'.
	* src/MSEHandshake.cc (verifyPadLength)
Tatsuhiro Tsujikawa 17 years ago
parent
commit
309ad8c5ef
3 changed files with 10 additions and 5 deletions
  1. 5 0
      ChangeLog
  2. 4 4
      src/MSEHandshake.cc
  3. 1 1
      src/MSEHandshake.h

+ 5 - 0
ChangeLog

@@ -1,3 +1,8 @@
+2008-05-14  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
+
+	Changed the type of padName from `const std::string&' to `const char*'.
+	* src/MSEHandshake.cc (verifyPadLength)
+
 2008-05-14  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
 	Defined "sha1" as static const std::string.

+ 4 - 4
src/MSEHandshake.cc

@@ -519,15 +519,15 @@ void MSEHandshake::sendReceiverStep2()
   encryptAndSendData(buffer, 8+4+2+padDLength);
 }
 
-uint16_t MSEHandshake::verifyPadLength(const unsigned char* padlenbuf, const std::string& padName)
+uint16_t MSEHandshake::verifyPadLength(const unsigned char* padlenbuf, const char* padName)
 {
-  _logger->debug("CUID#%d - Veryfying Pad length for %s", _cuid, padName.c_str());
+  _logger->debug("CUID#%d - Veryfying Pad length for %s", _cuid, padName);
 
   uint16_t padLength = decodeLength16(padlenbuf);
-  _logger->debug("CUID#%d - len(%s)=%u", _cuid, padName.c_str(), padLength);
+  _logger->debug("CUID#%d - len(%s)=%u", _cuid, padName, padLength);
   if(padLength > 512) {
     throw DlAbortEx
-      (StringFormat("Too large %s length: %u", padName.c_str(), padLength).str());
+      (StringFormat("Too large %s length: %u", padName, padLength).str());
   }
   return padLength;
 }

+ 1 - 1
src/MSEHandshake.h

@@ -116,7 +116,7 @@ private:
   }
 
   uint16_t verifyPadLength(const unsigned char* padlenbuf,
-			   const std::string& padName);
+			   const char* padName);
 
   void verifyVC(const unsigned char* vcbuf);