projects
/
silc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
eb7e7d7
)
Fixed client entry updating in IDENTIFY and WHOWAS replies.
author
Pekka Riikonen
<priikone@silcnet.org>
Sun, 11 Nov 2007 11:22:58 +0000
(11:22 +0000)
committer
Pekka Riikonen
<priikone@silcnet.org>
Sun, 11 Nov 2007 11:22:58 +0000
(11:22 +0000)
apps/silcd/command_reply.c
patch
|
blob
|
history
diff --git
a/apps/silcd/command_reply.c
b/apps/silcd/command_reply.c
index 97aedf0e8e37455267c4818136418a9c24510b9f..36eb1368497914f62fe0e3623ee9276aa6f71b08 100644
(file)
--- a/
apps/silcd/command_reply.c
+++ b/
apps/silcd/command_reply.c
@@
-515,7
+515,7
@@
silc_server_command_reply_whowas_save(SilcServerCommandReplyContext cmd)
if (!nickname) {
SILC_LOG_ERROR(("Malformed nickname '%s' received in WHOWAS reply "
"from %s",
if (!nickname) {
SILC_LOG_ERROR(("Malformed nickname '%s' received in WHOWAS reply "
"from %s",
-
hostname ? hostname : "", nick
));
+
nick, hostname ? hostname : ""
));
return FALSE;
}
return FALSE;
}
@@
-534,12
+534,10
@@
silc_server_command_reply_whowas_save(SilcServerCommandReplyContext cmd)
client->data.status |= SILC_IDLIST_STATUS_RESOLVED;
client->data.status &= ~SILC_IDLIST_STATUS_RESOLVING;
client->data.status |= SILC_IDLIST_STATUS_RESOLVED;
client->data.status &= ~SILC_IDLIST_STATUS_RESOLVING;
- /* Remove the old cache entry and create a new one */
- silc_idcache_del_by_context(global ? server->global_list->clients :
- server->local_list->clients, client, NULL);
- silc_idcache_add(global ? server->global_list->clients :
- server->local_list->clients, nickname, client->id,
- client);
+ /* Update cache entry */
+ silc_idcache_update_by_context(global ? server->global_list->clients :
+ server->local_list->clients, client, NULL,
+ nickname, TRUE);
}
/* If client is global and is not on any channel then add that we'll
}
/* If client is global and is not on any channel then add that we'll
@@
-675,17
+673,13
@@
silc_server_command_reply_identify_save(SilcServerCommandReplyContext cmd)
return FALSE;
}
return FALSE;
}
- /* Remove the old cache entry */
- silc_idcache_del_by_context(global ? server->global_list->clients :
- server->local_list->clients, client, NULL);
-
silc_free(client->nickname);
client->nickname = strdup(nick);
silc_free(client->nickname);
client->nickname = strdup(nick);
- /*
Add new cache entry
*/
- silc_idcache_
add
(global ? server->global_list->clients :
-
server->local_list->clients, name, client->id
,
-
client
);
+ /*
Update the context
*/
+ silc_idcache_
update_by_context
(global ? server->global_list->clients :
+
server->local_list->clients, client
,
+
NULL, name, TRUE
);
}
if (info) {
}
if (info) {