|
reSIProcate/repro
9694
|
#include <cassert>#include "rutil/Data.hxx"#include "rutil/DataStream.hxx"#include "rutil/ParseBuffer.hxx"#include "resip/stack/Symbols.hxx"#include "rutil/Logger.hxx"#include "repro/UserStore.hxx"#include "repro/AbstractDb.hxx"
Go to the source code of this file.
Defines | |
| #define | RESIPROCATE_SUBSYSTEM Subsystem::REPRO |
Functions | |
| static void | encodeString (oDataStream &s, const Data &data) |
| static void | decodeString (iDataStream &s, Data &data) |
| #define RESIPROCATE_SUBSYSTEM Subsystem::REPRO |
Definition at line 18 of file AbstractDb.cxx.
| static void decodeString | ( | iDataStream & | s, |
| Data & | data | ||
| ) | [static] |
Definition at line 31 of file AbstractDb.cxx.
{
data.clear();
if(s.eof()) return;
short len;
s.read((char*)(&len), sizeof(len));
if(s.eof()) return;
// [TODO] This is probably OK for now, but we can do better than this.
if (len > 8192)
{
ErrLog( << "Tried to decode a database record that was much larger (>8k) than expected. Returning an empty Data instead." );
return;
}
s.read(data.getBuf(len), len);
}
| static void encodeString | ( | oDataStream & | s, |
| const Data & | data | ||
| ) | [static] |
Definition at line 22 of file AbstractDb.cxx.
1.7.5.1