projects
/
silc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed QoS data limit handling in socket stream when reading data.
[silc.git]
/
lib
/
silccore
/
silcpacket.c
diff --git
a/lib/silccore/silcpacket.c
b/lib/silccore/silcpacket.c
index bea6357939731b0db4ba92ed16cda2cab5e83e9d..08c2a0ac177e591a943c4da5264e09555e848f8a 100644
(file)
--- a/
lib/silccore/silcpacket.c
+++ b/
lib/silccore/silcpacket.c
@@
-4,7
+4,7
@@
Author: Pekka Riikonen <priikone@silcnet.org>
Author: Pekka Riikonen <priikone@silcnet.org>
- Copyright (C) 1997 - 200
7
Pekka Riikonen
+ Copyright (C) 1997 - 200
8
Pekka Riikonen
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@
-336,7
+336,6
@@
static inline SilcBool silc_packet_stream_read(SilcPacketStream ps,
silc_mutex_unlock(ps->lock);
if (ret == -1) {
/* Cannot read now, do it later. */
silc_mutex_unlock(ps->lock);
if (ret == -1) {
/* Cannot read now, do it later. */
- silc_buffer_pull(inbuf, silc_buffer_len(inbuf));
return FALSE;
}
return FALSE;
}
@@
-394,7
+393,6
@@
static inline SilcBool silc_packet_stream_read(SilcPacketStream ps,
if (ret == -1) {
/* Cannot read now, do it later. */
if (ret == -1) {
/* Cannot read now, do it later. */
- silc_buffer_pull(inbuf, silc_buffer_len(inbuf));
return FALSE;
}
return FALSE;
}
@@
-887,6
+885,8
@@
void silc_packet_stream_destroy(SilcPacketStream stream)
return;
if (silc_atomic_sub_int8(&stream->refcnt, 1) > 0) {
return;
if (silc_atomic_sub_int8(&stream->refcnt, 1) > 0) {
+ if (stream->destroyed)
+ return;
stream->destroyed = TRUE;
SILC_LOG_DEBUG(("Marking packet stream %p destroyed", stream));
stream->destroyed = TRUE;
SILC_LOG_DEBUG(("Marking packet stream %p destroyed", stream));