MCPcopy Create free account
hub / github.com/Tripwire/tripwire-open-source / FormatAddressHeader

Method FormatAddressHeader

src/tripwire/mailmessage.cpp:406–422  ·  view source on GitHub ↗

TODO:BAM -- note that address headers can only have usascii chars TODO:BAM -- lines can only be 76 chars long -- enforce that!

Source from the content-addressed store, hash-verified

404// TODO:BAM -- note that address headers can only have usascii chars
405// TODO:BAM -- lines can only be 76 chars long -- enforce that!
406std::string cMailMessageUtil::FormatAddressHeader(const std::string& name, const std::string& addr)
407{
408 cDebug d("cMailMessageUtil::FormatAddressHeader");
409
410 d.TraceDebug("name: %s, value: %s\n", name.c_str(), addr.c_str());
411
412 std::string s;
413
414 s += name;
415 s += ": ";
416 s += addr;
417 s += "\r\n";
418
419 d.TraceDebug("came out as: %s\n", s.c_str());
420
421 return s;
422}
423
424// TODO:BAM -- lines can only be 76 chars long -- enforce that!
425std::string cMailMessageUtil::FormatNonAddressHeader(const std::string& name, const std::string& valC)

Callers

nothing calls this directly

Calls 2

c_strMethod · 0.80
TraceDebugMethod · 0.60

Tested by

no test coverage detected