diff --git a/doc/html/pip.qch b/doc/html/pip.qch
index bc62af5c..933667ad 100644
Binary files a/doc/html/pip.qch and b/doc/html/pip.qch differ
diff --git a/main.cpp b/main.cpp
index da053bec..6e5db56c 100644
--- a/main.cpp
+++ b/main.cpp
@@ -3,15 +3,11 @@
int main(int argc, char *argv[]) {
- PIVector2D v(2, 2, PIVector() << 1 << 2 << 3 << 4);
- piCout << v;
- PIByteArray ba;
- ba << v;
- piCout << ba.size();
- PIVector2D v2;
- ba >> v2;
- piCout << v2;
- piCout << v2[0][1];
+ PIDir dir("");
+ PIVector el = dir.entries();
+ /*piCout << el.size();
+ piForeachC (PIFile::FileInfo & i, el)
+ piCout << i;*/
return 0;
}
diff --git a/src_main/core/pibytearray.h b/src_main/core/pibytearray.h
index 599ed60e..082c2187 100755
--- a/src_main/core/pibytearray.h
+++ b/src_main/core/pibytearray.h
@@ -169,6 +169,8 @@ inline PIByteArray & operator <<(PIByteArray & s, const float v) {PBA_OPERATOR_T
inline PIByteArray & operator <<(PIByteArray & s, const double & v) {PBA_OPERATOR_TO return s;}
//! \relatesalso PIByteArray \brief Store operator
inline PIByteArray & operator <<(PIByteArray & s, const ldouble & v) {PBA_OPERATOR_TO return s;}
+//! \relatesalso PIByteArray \brief Store operator
+template inline PIByteArray & operator <<(PIByteArray & s, const PIFlags & v) {PBA_OPERATOR_TO return s;}
//! \relatesalso PIByteArray \brief Store operator, see \ref PIByteArray_sec1 for details
inline PIByteArray & operator <<(PIByteArray & s, const PIByteArray & v) {s << int(v.size_s()); int os = s.size_s(); s.enlarge(v.size_s()); if (v.size_s() > 0) memcpy(s.data(os), v.data(), v.size()); return s;}
//! \relatesalso PIByteArray \brief Store operator, see \ref PIByteArray_sec1 for details
@@ -205,6 +207,8 @@ inline PIByteArray & operator >>(PIByteArray & s, float & v) {assert(s.size() >=
inline PIByteArray & operator >>(PIByteArray & s, double & v) {assert(s.size() >= sizeof(v)); PBA_OPERATOR_FROM return s;}
//! \relatesalso PIByteArray \brief Restore operator
inline PIByteArray & operator >>(PIByteArray & s, ldouble & v) {assert(s.size() >= sizeof(v)); PBA_OPERATOR_FROM return s;}
+//! \relatesalso PIByteArray \brief Restore operator
+template inline PIByteArray & operator >>(PIByteArray & s, PIFlags & v) {PBA_OPERATOR_FROM return s;}
//! \relatesalso PIByteArray \brief Restore operator, see \ref PIByteArray_sec1 for details
inline PIByteArray & operator >>(PIByteArray & s, PIByteArray & v) {assert(s.size_s() >= 4); int sz; s >> sz; v.resize(sz); if (sz > 0) memcpy(v.data(), s.data(), v.size()); s.remove(0, v.size()); return s;}
//! \relatesalso PIByteArray \brief Restore operator, see \ref PIByteArray_sec1 for details
diff --git a/src_main/io/pibasetransfer.cpp b/src_main/io/pibasetransfer.cpp
index cf1e9256..21968db3 100644
--- a/src_main/io/pibasetransfer.cpp
+++ b/src_main/io/pibasetransfer.cpp
@@ -515,7 +515,7 @@ PIByteArray PIBaseTransfer::build_packet(int id) {
for (int i = 0; i < session[id].size_s(); i++) {
Part fi = session[id][i];
ret << fi;
- //piCout << "biuld" << fi;
+ //piCout << "build" << fi;
ba = buildPacket(fi);
bytes_cur += ba.size();
if (ba.size() != fi.size) piCoutObj << "***error while build packet, wrong part size";
diff --git a/src_main/io/pifiletransfer.cpp b/src_main/io/pifiletransfer.cpp
index ec549aee..5366597b 100644
--- a/src_main/io/pifiletransfer.cpp
+++ b/src_main/io/pifiletransfer.cpp
@@ -70,13 +70,17 @@ bool PIFileTransfer::send(PIVector entries) {
bool PIFileTransfer::sendFiles(const PIVector &files) {
files_ = files;
PIStringList names;
- // piCoutObj << "prepare to send" << files_.size() << "files";
- for(int i=0; i &files) {
step_mutex.lock();
pftheader.step = pft_Data;
PIVector pts;
- for (int i=0; i>(PIByteArray & s, PIFileTransfer::PFTHeader & v) {s >> v.raw_sig >> v.step >> v.session_id; return s;}
inline PIByteArray & operator <<(PIByteArray & s, const PIFileTransfer::PFTFileInfo & v) {s << v.dest_path << v.size << v.time_access << v.time_modification <<
- (int)v.flags << v.id_user << v.id_group << v.perm_user.raw << v.perm_group.raw << v.perm_other.raw; return s;}
+ v.flags << v.id_user << v.id_group << v.perm_user.raw << v.perm_group.raw << v.perm_other.raw; return s;}
inline PIByteArray & operator >>(PIByteArray & s, PIFileTransfer::PFTFileInfo & v) {s >> v.dest_path >> v.size >> v.time_access >> v.time_modification >>
- *(int*)(&(v.flags)) >> v.id_user >> v.id_group >> v.perm_user.raw >> v.perm_group.raw >> v.perm_other.raw; return s;}
+ v.flags >> v.id_user >> v.id_group >> v.perm_user.raw >> v.perm_group.raw >> v.perm_other.raw; return s;}
inline PICout operator <<(PICout s, const PIFileTransfer::PFTFileInfo & v) {
s.setControl(0, true);
diff --git a/src_main/io/piiodevice.cpp b/src_main/io/piiodevice.cpp
index 70ad8dea..6c55a9a0 100755
--- a/src_main/io/piiodevice.cpp
+++ b/src_main/io/piiodevice.cpp
@@ -212,6 +212,8 @@ void PIIODevice::terminate() {
void PIIODevice::begin() {
//cout << " begin\n";
+ if (threadedReadBufferSize() == 0)
+ piCoutObj << "Warning: threadedReadBufferSize() == 0, read may be useless!";
thread_started_ = false;
if (!opened_) {
if (open()) {