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
/
packet_send.c
diff --git
a/apps/silcd/packet_send.c
b/apps/silcd/packet_send.c
index 2c8786c3a5ada9eafd45c8a1fb44ca8b75334be4..8062551faa4d9393e83a1745095ec68ee961391e 100644
(file)
--- a/
apps/silcd/packet_send.c
+++ b/
apps/silcd/packet_send.c
@@
-875,8
+875,7
@@
void silc_server_packet_relay_to_channel(SilcServer server,
/* If private key mode is not set then decrypt the packet
and re-encrypt it */
if (!(channel->mode & SILC_CHANNEL_MODE_PRIVKEY)) {
/* If private key mode is not set then decrypt the packet
and re-encrypt it */
if (!(channel->mode & SILC_CHANNEL_MODE_PRIVKEY)) {
- unsigned char *tmp = silc_calloc(data_len, sizeof(*data));
- memcpy(tmp, data, data_len);
+ unsigned char *tmp = silc_memdup(data, data_len);
/* Decrypt the channel message (we don't check the MAC) */
if (channel->channel_key &&
/* Decrypt the channel message (we don't check the MAC) */
if (channel->channel_key &&
@@
-1036,13
+1035,14
@@
void silc_server_send_private_message(SilcServer server,
void silc_server_send_motd(SilcServer server,
SilcSocketConnection sock)
{
void silc_server_send_motd(SilcServer server,
SilcSocketConnection sock)
{
- char *motd;
+ char *motd
, *motd_file = NULL
;
uint32 motd_len;
uint32 motd_len;
- if (server->config
&& server->config->motd &&
- server->config->motd->motd_file) {
+ if (server->config
)
+ motd_file = server->config->server_info->motd_file;
- motd = silc_file_readfile(server->config->motd->motd_file, &motd_len);
+ if (motd_file) {
+ motd = silc_file_readfile(motd_file, &motd_len);
if (!motd)
return;
if (!motd)
return;