X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=lib%2Fsilcclient%2Fclient_prvmsg.c;h=2f10542746658fd3fe4856463164d5e79c93933c;hb=b3c198997d2adb79fb3c2e48cba9d0511badd9f0;hp=a5c6d7d171c1bf442bf737636d2faa8e247d0bb2;hpb=044263b77b2a2bf97011e7d100dd5ccccf8ca873;p=silc.git diff --git a/lib/silcclient/client_prvmsg.c b/lib/silcclient/client_prvmsg.c index a5c6d7d1..2f105427 100644 --- a/lib/silcclient/client_prvmsg.c +++ b/lib/silcclient/client_prvmsg.c @@ -166,6 +166,16 @@ void silc_client_private_message(SilcClient client, silc_hash_client_id_compare, NULL, &id_cache) || ((SilcClientEntry)id_cache->context)->nickname == NULL) { + + if (id_cache && id_cache->context) { + remote_client = (SilcClientEntry)id_cache->context; + if (remote_client->status & SILC_CLIENT_STATUS_RESOLVING) { + remote_client->status &= ~SILC_CLIENT_STATUS_RESOLVING; + goto out; + } + remote_client->status |= SILC_CLIENT_STATUS_RESOLVING; + } + /* Resolve the client info */ silc_client_get_client_by_id_resolve(client, conn, remote_id, silc_client_private_message_cb, @@ -208,8 +218,7 @@ void silc_client_private_message(SilcClient client, out: if (payload) silc_private_message_payload_free(payload); - if (remote_id) - silc_free(remote_id); + silc_free(remote_id); } /* Function that actually employes the received private message key */