X-Git-Url: http://git.silcnet.org/gitweb/?p=silc.git;a=blobdiff_plain;f=lib%2Fsilcutil%2Fsymbian%2Fsilcsymbiansocketstream.cpp;h=cce36443ad519803c9f3bda1cfc8d68ec1275c04;hp=ee7d23ddb71ede7097cbaf8b19f157dad598c0af;hb=196824372226561334cd638d6471267cbffb354c;hpb=b7339a06000ae918f43b1b6064a17d064c6d9b87 diff --git a/lib/silcutil/symbian/silcsymbiansocketstream.cpp b/lib/silcutil/symbian/silcsymbiansocketstream.cpp index ee7d23dd..cce36443 100644 --- a/lib/silcutil/symbian/silcsymbiansocketstream.cpp +++ b/lib/silcutil/symbian/silcsymbiansocketstream.cpp @@ -51,7 +51,8 @@ public: { SILC_LOG_DEBUG(("Send()")); s->sock->Send(buf, 0, iStatus, ret_len); - SetActive(); + if (!IsActive()) + SetActive(); } /* Send data */ @@ -67,7 +68,8 @@ public: tmp = (TText *)remote_ip; if (remote.Input(tmp) == KErrNone) { s->sock->SendTo(buf, remote, 0, iStatus, ret_len); - SetActive(); + if (!IsActive()) + SetActive(); } } @@ -123,7 +125,7 @@ public: { SILC_LOG_DEBUG(("Read()")); - if (!s->stream || s->stream->connected) + if (s->stream && s->stream->connected) s->sock->RecvOneOrMore(inbuf, 0, iStatus, read_len); else s->sock->RecvFrom(inbuf, remote, 0, iStatus); @@ -202,6 +204,7 @@ SilcSymbianSocket *silc_create_symbian_socket(RSocket *sock, silc_free(stream); return NULL; } + stream->send->s = stream; stream->receive = new SilcSymbianSocketReceive; if (!stream->receive) { @@ -209,6 +212,7 @@ SilcSymbianSocket *silc_create_symbian_socket(RSocket *sock, silc_free(stream); return NULL; } + stream->receive->s = stream; stream->receive->inbuf_ptr = NULL; stream->receive->inbuf_len = 0;