projects
/
silc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Removed unnecessary stream op pointer checks.
[silc.git]
/
lib
/
silccore
/
silcpacket.c
diff --git
a/lib/silccore/silcpacket.c
b/lib/silccore/silcpacket.c
index 45af3c666778a657a77bb5ff5f7126ed6eed42a6..55447f3d93a6bf571ed05e66fecda6e2fbdbf4b4 100644
(file)
--- a/
lib/silccore/silcpacket.c
+++ b/
lib/silccore/silcpacket.c
@@
-2306,12
+2306,10
@@
int silc_packet_wrap_read(SilcStream stream, unsigned char *buf,
SilcPacket packet;
int len;
SilcPacket packet;
int len;
- if (pws->
ops != &silc_packet_stream_ops
)
+ if (pws->
closed
)
return -2;
if (!silc_list_count(pws->in_queue))
return -1;
return -2;
if (!silc_list_count(pws->in_queue))
return -1;
- if (pws->closed)
- return -2;
silc_list_start(pws->in_queue);
packet = silc_list_get(pws->in_queue);
silc_list_start(pws->in_queue);
packet = silc_list_get(pws->in_queue);
@@
-2334,9
+2332,6
@@
int silc_packet_wrap_write(SilcStream stream, const unsigned char *data,
{
SilcPacketWrapperStream pws = stream;
{
SilcPacketWrapperStream pws = stream;
- if (pws->ops != &silc_packet_stream_ops)
- return -2;
-
/* Send the SILC packet */
if (!silc_packet_send(pws->stream, pws->type, pws->flags, data, data_len))
return -2;
/* Send the SILC packet */
if (!silc_packet_send(pws->stream, pws->type, pws->flags, data, data_len))
return -2;
@@
-2350,8
+2345,6
@@
SilcBool silc_packet_wrap_close(SilcStream stream)
{
SilcPacketWrapperStream pws = stream;
{
SilcPacketWrapperStream pws = stream;
- if (pws->ops != &silc_packet_stream_ops)
- return FALSE;
if (pws->closed)
return TRUE;
if (pws->closed)
return TRUE;
@@
-2371,9
+2364,6
@@
void silc_packet_wrap_destroy(SilcStream stream)
SilcPacketWrapperStream pws = stream;
SilcPacket packet;
SilcPacketWrapperStream pws = stream;
SilcPacket packet;
- if (pws->ops != &silc_packet_stream_ops)
- return;
-
SILC_LOG_DEBUG(("Destroying wrapped packet stream %p", pws));
silc_stream_close(stream);
SILC_LOG_DEBUG(("Destroying wrapped packet stream %p", pws));
silc_stream_close(stream);
@@
-2394,8
+2384,6
@@
void silc_packet_wrap_notifier(SilcStream stream,
{
SilcPacketWrapperStream pws = stream;
{
SilcPacketWrapperStream pws = stream;
- if (pws->ops != &silc_packet_stream_ops)
- return;
if (pws->closed)
return;
if (pws->closed)
return;