projects
/
silc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f9a78ed
)
updates.
author
Pekka Riikonen
<priikone@silcnet.org>
Thu, 12 Apr 2001 10:09:38 +0000
(10:09 +0000)
committer
Pekka Riikonen
<priikone@silcnet.org>
Thu, 12 Apr 2001 10:09:38 +0000
(10:09 +0000)
apps/silcd/server.c
patch
|
blob
|
history
lib/silcclient/client.c
patch
|
blob
|
history
lib/silcclient/client_channel.c
patch
|
blob
|
history
lib/silcclient/client_internal.h
patch
|
blob
|
history
lib/silcclient/client_prvmsg.c
patch
|
blob
|
history
diff --git
a/apps/silcd/server.c
b/apps/silcd/server.c
index d9b30393768799d3e13437fa6d2c0caf5fb06563..7ba210e77dd9d8085d16c1518ede3d66c3e49a1a 100644
(file)
--- a/
apps/silcd/server.c
+++ b/
apps/silcd/server.c
@@
-121,12
+121,14
@@
int silc_server_init(SilcServer server)
assert(server->config);
/* Set public and private keys */
assert(server->config);
/* Set public and private keys */
- server->public_key = server->config->server_keys->public_key;
- server->private_key = server->config->server_keys->private_key;
-
if (!server->public_key || !server
->private_key) {
+ if (!server->config->server_keys ||
+ !server->config->server_keys->public_key ||
+
!server->config->server_keys
->private_key) {
SILC_LOG_ERROR(("Server public key and/or private key does not exist"));
return FALSE;
}
SILC_LOG_ERROR(("Server public key and/or private key does not exist"));
return FALSE;
}
+ server->public_key = server->config->server_keys->public_key;
+ server->private_key = server->config->server_keys->private_key;
/* XXX After server is made as Silc Server Library this can be given
as argument, for now this is hard coded */
/* XXX After server is made as Silc Server Library this can be given
as argument, for now this is hard coded */
@@
-882,12
+884,12
@@
SILC_TASK_CALLBACK(silc_server_connect_to_router_final)
timeout!! */
hb_context = silc_calloc(1, sizeof(*hb_context));
hb_context->server = server;
timeout!! */
hb_context = silc_calloc(1, sizeof(*hb_context));
hb_context->server = server;
- silc_socket_set_heartbeat(sock, 60, hb_context,
+ silc_socket_set_heartbeat(sock, 60
0
, hb_context,
silc_server_perform_heartbeat,
server->timeout_queue);
/* Register re-key timeout */
silc_server_perform_heartbeat,
server->timeout_queue);
/* Register re-key timeout */
- idata->rekey->timeout =
6
0; /* XXX hardcoded */
+ idata->rekey->timeout =
360
0; /* XXX hardcoded */
idata->rekey->context = (void *)server;
silc_task_register(server->timeout_queue, sock->sock,
silc_server_rekey_callback,
idata->rekey->context = (void *)server;
silc_task_register(server->timeout_queue, sock->sock,
silc_server_rekey_callback,
@@
-1257,7
+1259,7
@@
SILC_TASK_CALLBACK(silc_server_accept_new_connection_final)
timeout!! */
hb_context = silc_calloc(1, sizeof(*hb_context));
hb_context->server = server;
timeout!! */
hb_context = silc_calloc(1, sizeof(*hb_context));
hb_context->server = server;
- silc_socket_set_heartbeat(sock, 60, hb_context,
+ silc_socket_set_heartbeat(sock, 60
0
, hb_context,
silc_server_perform_heartbeat,
server->timeout_queue);
silc_server_perform_heartbeat,
server->timeout_queue);
@@
-2809,7
+2811,7
@@
SILC_TASK_CALLBACK(silc_server_channel_key_rekey)
silc_task_register(server->timeout_queue, 0,
silc_server_channel_key_rekey,
silc_task_register(server->timeout_queue, 0,
silc_server_channel_key_rekey,
- (void *)rekey,
6
0, 0,
+ (void *)rekey,
360
0, 0,
SILC_TASK_TIMEOUT,
SILC_TASK_PRI_NORMAL);
}
SILC_TASK_TIMEOUT,
SILC_TASK_PRI_NORMAL);
}
@@
-2880,7
+2882,7
@@
void silc_server_create_channel_key(SilcServer server,
silc_server_channel_key_rekey);
silc_task_register(server->timeout_queue, 0,
silc_server_channel_key_rekey,
silc_server_channel_key_rekey);
silc_task_register(server->timeout_queue, 0,
silc_server_channel_key_rekey,
- (void *)channel->rekey,
6
0, 0,
+ (void *)channel->rekey,
360
0, 0,
SILC_TASK_TIMEOUT,
SILC_TASK_PRI_NORMAL);
}
SILC_TASK_TIMEOUT,
SILC_TASK_PRI_NORMAL);
}
@@
-2985,7
+2987,7
@@
SilcChannelEntry silc_server_save_channel_key(SilcServer server,
silc_server_channel_key_rekey);
silc_task_register(server->timeout_queue, 0,
silc_server_channel_key_rekey,
silc_server_channel_key_rekey);
silc_task_register(server->timeout_queue, 0,
silc_server_channel_key_rekey,
- (void *)channel->rekey,
6
0, 0,
+ (void *)channel->rekey,
360
0, 0,
SILC_TASK_TIMEOUT,
SILC_TASK_PRI_NORMAL);
}
SILC_TASK_TIMEOUT,
SILC_TASK_PRI_NORMAL);
}
diff --git
a/lib/silcclient/client.c
b/lib/silcclient/client.c
index 1b3cab0fa473f09d8b45fc1b9c75848483b84ce9..b0498639f2b1695e36ae120f23145979fd58d67a 100644
(file)
--- a/
lib/silcclient/client.c
+++ b/
lib/silcclient/client.c
@@
-557,7
+557,7
@@
SILC_TASK_CALLBACK(silc_client_connect_to_server_final)
conn->remote_id_data_len = SILC_ID_SERVER_LEN;
/* Register re-key timeout */
conn->remote_id_data_len = SILC_ID_SERVER_LEN;
/* Register re-key timeout */
- conn->rekey->timeout =
360
0; /* XXX hardcoded */
+ conn->rekey->timeout =
6
0; /* XXX hardcoded */
conn->rekey->context = (void *)client;
silc_task_register(client->timeout_queue, conn->sock->sock,
silc_client_rekey_callback,
conn->rekey->context = (void *)client;
silc_task_register(client->timeout_queue, conn->sock->sock,
silc_client_rekey_callback,
diff --git
a/lib/silcclient/client_channel.c
b/lib/silcclient/client_channel.c
index 408f3fc9871635de4704fe33661a8965060a7de8..29880be4be91952f6a23539a97142ab611f5d0d5 100644
(file)
--- a/
lib/silcclient/client_channel.c
+++ b/
lib/silcclient/client_channel.c
@@
-146,7
+146,7
@@
void silc_client_send_channel_message(SilcClient client,
sock->outbuf->data, sock->outbuf->len);
/* Now actually send the packet */
sock->outbuf->data, sock->outbuf->len);
/* Now actually send the packet */
- silc_client_packet_send_real(client, sock, force_send);
+ silc_client_packet_send_real(client, sock, force_send
, FALSE
);
silc_buffer_free(payload);
silc_free(id_string);
}
silc_buffer_free(payload);
silc_free(id_string);
}
diff --git
a/lib/silcclient/client_internal.h
b/lib/silcclient/client_internal.h
index 5232ec379c82c3c7e636d1dc33afe3a832b82a0c..dadf8f728b28f49560bf00954d25a42bae5a184f 100644
(file)
--- a/
lib/silcclient/client_internal.h
+++ b/
lib/silcclient/client_internal.h
@@
-67,6
+67,7
@@
SILC_TASK_CALLBACK_GLOBAL(silc_client_packet_process);
SILC_TASK_CALLBACK_GLOBAL(silc_client_failure_callback);
int silc_client_packet_send_real(SilcClient client,
SilcSocketConnection sock,
SILC_TASK_CALLBACK_GLOBAL(silc_client_failure_callback);
int silc_client_packet_send_real(SilcClient client,
SilcSocketConnection sock,
- int force_send);
+ bool force_send,
+ bool flush);
#endif
#endif
diff --git
a/lib/silcclient/client_prvmsg.c
b/lib/silcclient/client_prvmsg.c
index 0db6fd3142a0a1028fa7285bc39142444fc53957..06f0555aaf6d3e8f8076ba0cd4b07adce4540bc0 100644
(file)
--- a/
lib/silcclient/client_prvmsg.c
+++ b/
lib/silcclient/client_prvmsg.c
@@
-112,7
+112,7
@@
void silc_client_send_private_message(SilcClient client,
sock->outbuf->data, sock->outbuf->len);
/* Now actually send the packet */
sock->outbuf->data, sock->outbuf->len);
/* Now actually send the packet */
- silc_client_packet_send_real(client, sock, force_send);
+ silc_client_packet_send_real(client, sock, force_send
, FALSE
);
silc_free(packetdata.dst_id);
out:
silc_free(packetdata.dst_id);
out: