and thus not require any memory allocation. Same will happen
with silc_id_payload_* functions.
+ o Remove the `truelen' field from SilcBuffer as it is entirely
+ redundant since we can get the true length of the buffer by
+ doing buffer->end - buffer->header. Add SILC_BUFFER_TRUELEN
+ macro instead. Consider also removing `len' field too since
+ it effectively is buffer->tail - buffer->data, and adding
+ SILC_BUFFER_LEN macro can do the same. These would save
+ totally 8 bytes of memory per buffer.
+
+ Add also perhaps function silc_buffer_alloc_size that would
+ effectively do:
+
+ return silc_buffer_pull_tail(silc_buffer_alloc(size),
+ size);
+
+ to not require the user to give the pull_tail anymore.
+
o Optimizations in Server
o Remove the big switch statement from the function
should be analyzed too how slow the task registering process
actually is, and find out ways to optimize it.
+ o The SERVER_SIGNOFF notify handing is not optimal, because it'll
+ cause sending of multiple SIGNOFF notify's instead of the one
+ SERVER_SIGNOFF notify that the server received. This should be
+ optimized so that the only SERVER_SIGNOFF is sent and not
+ SIGNOFF of notify at all (using SIGNOFF takes the idea about
+ SERVER_SIGNOFF away entirely).
+
o Add SilcAsyncOperation to utility library.
o Cipher optimizations (asm, that this) at least for i386 would be nice.
uint32 mode;
unsigned char *tmp;
uint32 tmp_len;
+ bool local;
SILC_LOG_DEBUG(("Start"));
/* Get server entry */
server_entry = silc_idlist_find_server_by_id(server->global_list,
server_id, TRUE, NULL);
+ local = TRUE;
if (!server_entry) {
server_entry = silc_idlist_find_server_by_id(server->local_list,
server_id, TRUE, NULL);
+ global = TRUE;
if (!server_entry) {
/* If we are normal server then we might not have the server. Check
whether router was kind enough to send the list of all clients
if (server->server_type != SILC_ROUTER &&
silc_argument_get_arg_num(args) > 1) {
int i;
- bool local;
for (i = 1; i < silc_argument_get_arg_num(args); i++) {
/* Get Client ID */
silc_server_remove_clients_by_server(server, server_entry, TRUE);
/* Remove the server entry */
- if (!silc_idlist_del_server(server->global_list, server_entry))
- silc_idlist_del_server(server->local_list, server_entry);
+ silc_idlist_del_server(local ? server->local_list :
+ server->global_list, server_entry);
/* XXX update statistics */
Currently valid data area is considered to be the main data area in
the buffer. However, the entire buffer is of course valid data and can
be used as such. Usually head section of the buffer includes different
- kind of headers or similiar. Data section includes the main data of
+ kind of headers or similar. Data section includes the main data of
the buffer. Tail section can be seen as a reserve space of the data
section. Tail section can be pulled towards end thus the data section
becomes larger.