fixed wrong use of flags in pqibin (wtf??)

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8431 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2015-06-14 09:49:21 +00:00
parent d38068c4bc
commit 31492c2f3a

View file

@ -54,7 +54,7 @@ virtual int netstatus() { return 1;}
virtual int isactive() { return (buf != NULL);} virtual int isactive() { return (buf != NULL);}
virtual bool moretoread(uint32_t /* usec */ ) virtual bool moretoread(uint32_t /* usec */ )
{ {
if ((buf) && (bin_flags | BIN_FLAGS_READABLE)) if ((buf) && (bin_flags & BIN_FLAGS_READABLE))
{ {
if ((size - ftell(buf)) > 0) if ((size - ftell(buf)) > 0)
{ {
@ -67,7 +67,7 @@ virtual bool moretoread(uint32_t /* usec */ )
virtual int close(); virtual int close();
virtual bool cansend(uint32_t /* usec */) virtual bool cansend(uint32_t /* usec */)
{ {
return (bin_flags | BIN_FLAGS_WRITEABLE); return (bin_flags & BIN_FLAGS_WRITEABLE);
} }
virtual bool bandwidthLimited() { return false; } virtual bool bandwidthLimited() { return false; }
@ -161,7 +161,7 @@ virtual int netstatus() { return 1; }
virtual int isactive() { return 1; } virtual int isactive() { return 1; }
virtual bool moretoread(uint32_t /* usec */) virtual bool moretoread(uint32_t /* usec */)
{ {
if ((buf) && (bin_flags | BIN_FLAGS_READABLE )) if ((buf) && (bin_flags & BIN_FLAGS_READABLE ))
{ {
if (readloc < recvsize) if (readloc < recvsize)
{ {
@ -174,7 +174,7 @@ virtual bool moretoread(uint32_t /* usec */)
virtual int close(); virtual int close();
virtual bool cansend(uint32_t /* usec */) virtual bool cansend(uint32_t /* usec */)
{ {
return (bin_flags | BIN_FLAGS_WRITEABLE); return (bin_flags & BIN_FLAGS_WRITEABLE);
} }
virtual bool bandwidthLimited() { return false; } virtual bool bandwidthLimited() { return false; }