projects
/
silc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
updates.
[silc.git]
/
lib
/
silcclient
/
client_prvmsg.c
diff --git
a/lib/silcclient/client_prvmsg.c
b/lib/silcclient/client_prvmsg.c
index 9dc862141099d1fa5172677136133e067fc63f66..88bedabea4158f8e72481fa7591307c9aceefb68 100644
(file)
--- a/
lib/silcclient/client_prvmsg.c
+++ b/
lib/silcclient/client_prvmsg.c
@@
-147,7
+147,6
@@
void silc_client_private_message(SilcClient client,
{
SilcClientConnection conn = (SilcClientConnection)sock->user_data;
SilcPrivateMessagePayload payload = NULL;
{
SilcClientConnection conn = (SilcClientConnection)sock->user_data;
SilcPrivateMessagePayload payload = NULL;
- SilcIDCacheEntry id_cache = NULL;
SilcClientID *remote_id = NULL;
SilcClientEntry remote_client;
SilcMessageFlags flags;
SilcClientID *remote_id = NULL;
SilcClientEntry remote_client;
SilcMessageFlags flags;
@@
-162,11
+161,8
@@
void silc_client_private_message(SilcClient client,
/* Check whether we know this client already */
remote_client = silc_client_get_client_by_id(client, conn, remote_id);
/* Check whether we know this client already */
remote_client = silc_client_get_client_by_id(client, conn, remote_id);
- if (!remote_client ||
- ((SilcClientEntry)id_cache->context)->nickname == NULL) {
-
+ if (!remote_client || !remote_client->nickname) {
if (remote_client) {
if (remote_client) {
- remote_client = (SilcClientEntry)id_cache->context;
if (remote_client->status & SILC_CLIENT_STATUS_RESOLVING) {
remote_client->status &= ~SILC_CLIENT_STATUS_RESOLVING;
goto out;
if (remote_client->status & SILC_CLIENT_STATUS_RESOLVING) {
remote_client->status &= ~SILC_CLIENT_STATUS_RESOLVING;
goto out;
@@
-348,8
+344,7
@@
int silc_client_add_private_message_key(SilcClient client,
}
/* Save the key */
}
/* Save the key */
- client_entry->key = silc_calloc(key_len, sizeof(*client_entry->key));
- memcpy(client_entry->key, key, key_len);
+ client_entry->key = silc_memdup(key, key_len);
client_entry->key_len = key_len;
/* Produce the key material as the protocol defines */
client_entry->key_len = key_len;
/* Produce the key material as the protocol defines */