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]
/
apps
/
silcd
/
idlist.c
diff --git
a/apps/silcd/idlist.c
b/apps/silcd/idlist.c
index 5788e65656a497a5f81c1e9e62998b0af0c1f612..f762787fe80af56f9e921192b0bb14947bafccce 100644
(file)
--- a/
apps/silcd/idlist.c
+++ b/
apps/silcd/idlist.c
@@
-44,6
+44,8
@@
void silc_idlist_add_data(void *entry, SilcIDListData idata)
data->last_receive = idata->last_receive;
data->last_sent = idata->last_sent;
data->status = idata->status;
data->last_receive = idata->last_receive;
data->last_sent = idata->last_sent;
data->status = idata->status;
+
+ data->created = time(0); /* Update creation time */
}
/* Free's all data in the common ID entry data structure. */
}
/* Free's all data in the common ID entry data structure. */
@@
-281,10
+283,8
@@
int silc_idlist_del_server(SilcIDList id_list, SilcServerEntry entry)
return FALSE;
/* Free data */
return FALSE;
/* Free data */
- if (entry->server_name)
- silc_free(entry->server_name);
- if (entry->id)
- silc_free(entry->id);
+ silc_free(entry->server_name);
+ silc_free(entry->id);
memset(entry, 'F', sizeof(*entry));
silc_free(entry);
memset(entry, 'F', sizeof(*entry));
silc_free(entry);
@@
-352,14
+352,10
@@
int silc_idlist_del_client(SilcIDList id_list, SilcClientEntry entry)
return FALSE;
/* Free data */
return FALSE;
/* Free data */
- if (entry->nickname)
- silc_free(entry->nickname);
- if (entry->username)
- silc_free(entry->username);
- if (entry->userinfo)
- silc_free(entry->userinfo);
- if (entry->id)
- silc_free(entry->id);
+ silc_free(entry->nickname);
+ silc_free(entry->username);
+ silc_free(entry->userinfo);
+ silc_free(entry->id);
memset(entry, 'F', sizeof(*entry));
silc_free(entry);
memset(entry, 'F', sizeof(*entry));
silc_free(entry);
@@
-575,6
+571,7
@@
silc_idlist_add_channel(SilcIDList id_list, char *channel_name, int mode,
channel->router = router;
channel->channel_key = channel_key;
channel->hmac = hmac;
channel->router = router;
channel->channel_key = channel_key;
channel->hmac = hmac;
+ channel->created = time(0);
if (!channel->hmac)
if (!silc_hmac_alloc(SILC_DEFAULT_HMAC, NULL, &channel->hmac)) {
silc_free(channel);
if (!channel->hmac)
if (!silc_hmac_alloc(SILC_DEFAULT_HMAC, NULL, &channel->hmac)) {
silc_free(channel);
@@
-622,24
+619,18
@@
int silc_idlist_del_channel(SilcIDList id_list, SilcChannelEntry entry)
return FALSE;
/* Free data */
return FALSE;
/* Free data */
- if (entry->channel_name)
- silc_free(entry->channel_name);
- if (entry->id)
- silc_free(entry->id);
- if (entry->topic)
- silc_free(entry->topic);
+ silc_free(entry->channel_name);
+ silc_free(entry->id);
+ silc_free(entry->topic);
if (entry->channel_key)
silc_cipher_free(entry->channel_key);
if (entry->key) {
memset(entry->key, 0, entry->key_len / 8);
silc_free(entry->key);
}
if (entry->channel_key)
silc_cipher_free(entry->channel_key);
if (entry->key) {
memset(entry->key, 0, entry->key_len / 8);
silc_free(entry->key);
}
- if (entry->cipher)
- silc_free(entry->cipher);
- if (entry->hmac_name)
- silc_free(entry->hmac_name);
- if (entry->rekey)
- silc_free(entry->rekey);
+ silc_free(entry->cipher);
+ silc_free(entry->hmac_name);
+ silc_free(entry->rekey);
/* Free all client entrys from the users list. The silc_hash_table_free
will free all the entries so they are not freed at the foreach
/* Free all client entrys from the users list. The silc_hash_table_free
will free all the entries so they are not freed at the foreach