{
SILC_LOG_DEBUG(("Initializing client"));
+ assert(client);
assert(client->username);
assert(client->hostname);
assert(client->realname);
{
SILC_LOG_DEBUG(("Running client"));
+ assert(client);
assert(client->pkcs);
assert(client->public_key);
assert(client->private_key);
SilcClientConnAuthRequest connauth;
SilcBuffer packet;
+ assert(client && conn);
connauth = silc_calloc(1, sizeof(*connauth));
connauth->callback = callback;
connauth->context = context;
int force_send)
{
int i;
- SilcSocketConnection sock = conn->sock;
+ SilcSocketConnection sock;
SilcBuffer payload;
SilcPacketContext packetdata;
const SilcBufferStruct packet;
int block_len;
SilcChannelUser chu;
+ assert(client && conn && channel);
+ sock = conn->sock;
SILC_LOG_DEBUG(("Sending packet to channel"));
chu = silc_client_on_channel(channel, conn->local_entry);
unsigned char hash[32];
SilcSKEKeyMaterial *keymat;
+ assert(client && channel);
+
if (!(channel->mode & SILC_CHANNEL_MODE_PRIVKEY))
return FALSE;
{
SilcChannelPrivateKey entry;
+ assert(client && channel);
+
if (!channel->private_keys)
return FALSE;
{
SilcChannelPrivateKey entry;
+ assert(client && channel);
+
if (!channel->private_keys)
return FALSE;
SilcChannelPrivateKey *keys = NULL, entry;
SilcUInt32 count = 0;
+ assert(client && channel);
+
if (!channel->private_keys)
return NULL;
SilcChannelEntry channel,
SilcChannelPrivateKey key)
{
+ assert(client && channel);
channel->curr_key = key;
}
SilcUInt32 data_len,
int force_send)
{
- SilcSocketConnection sock = conn->sock;
+ SilcSocketConnection sock;
SilcBuffer buffer;
SilcPacketContext packetdata;
const SilcBufferStruct packet;
SilcHmac hmac;
int block_len;
+ assert(client && conn && client_entry);
+ sock = conn->sock;
SILC_LOG_DEBUG(("Sending private message"));
/* Encode private message payload */
int i;
SilcSKEKeyMaterial *keymat;
- assert(client_entry);
+ assert(client && client_entry);
/* Return FALSE if key already set */
if (client_entry->send_key && client_entry->receive_key)
SilcSKEKeyMaterial *key,
bool responder)
{
- assert(client_entry);
+ assert(client && client_entry);
/* Return FALSE if key already set */
if (client_entry->send_key && client_entry->receive_key)
SilcClientEntry client_entry,
int force_send)
{
- SilcSocketConnection sock = conn->sock;
+ SilcSocketConnection sock;
SilcBuffer buffer;
int cipher_len;
const char *cipher;
+ assert(client && conn && client_entry);
+
+ sock = conn->sock;
if (!client_entry->send_key || !client_entry->key)
return FALSE;
SilcClientConnection conn,
SilcClientEntry client_entry)
{
- assert(client_entry);
+ assert(client && client_entry);
if (!client_entry->send_key && !client_entry->receive_key)
return FALSE;
SilcIDCacheList list;
SilcClientEntry entry;
+ assert(client && conn);
+
if (!silc_idcache_get_all(conn->internal->client_cache, &list))
return NULL;
SilcClientConnection conn,
char *message)
{
+ assert(client && conn);
+
if (!message && conn->internal->away) {
silc_free(conn->internal->away->away);
silc_free(conn->internal->away);
SilcBuffer packet;
va_list ap;
+ assert(client && conn);
+
va_start(ap, argc);
packet = silc_command_payload_encode_vap(command, ident, argc, ap);
{
SilcClientCommand cmd;
+ assert(client);
+
silc_list_start(client->internal->commands);
while ((cmd = silc_list_get(client->internal->commands)) != SILC_LIST_END) {
if (cmd->name && !strcmp(cmd->name, name))
void silc_client_command_call(SilcClientCommand command,
SilcClientCommandContext cmd)
{
+ assert(command);
(*command->command)((void *)cmd, NULL);
}
{
SilcClientCommandPending *reply;
+ assert(conn);
reply = silc_calloc(1, sizeof(*reply));
reply->reply_cmd = reply_cmd;
reply->ident = ident;
int i = 0;
bool found = FALSE;
+ assert(client && conn);
+ if (!nickname)
+ return NULL;
+
/* Find ID from cache */
if (!silc_idcache_find_by_name(conn->internal->client_cache,
(char *)nickname, &list))
int len;
char *userhost;
+ assert(client && conn);
+
if (!nickname)
return;
GetClientsByListInternal in;
bool wait_res = FALSE;
+ assert(client && conn && client_id_list);
+
SILC_LOG_DEBUG(("Start"));
in = silc_calloc(1, sizeof(*in));
{
SilcIDCacheEntry id_cache;
+ assert(client && conn);
+ if (!client_id)
+ return NULL;
+
SILC_LOG_DEBUG(("Finding client by ID (%s)",
silc_id_render(client_id, SILC_ID_CLIENT)));
SilcBuffer idp;
GetClientByIDInternal i = silc_calloc(1, sizeof(*i));
+ assert(client && conn && client_id);
+
SILC_LOG_DEBUG(("Start"));
i->client = client;
SilcIDCacheEntry id_cache;
SilcChannelEntry entry;
+ assert(client && conn);
+ if (!channel)
+ return NULL;
+
SILC_LOG_DEBUG(("Start"));
if (!silc_idcache_find_by_name_one(conn->internal->channel_cache, channel,
SilcIDCacheEntry id_cache;
SilcChannelEntry entry;
+ assert(client && conn);
+ if (!channel_id)
+ return NULL;
+
SILC_LOG_DEBUG(("Start"));
if (!silc_idcache_find_by_id_one(conn->internal->channel_cache, channel_id,
SilcBuffer idp;
GetChannelByIDInternal i = silc_calloc(1, sizeof(*i));
+ assert(client && conn && channel_id);
+
SILC_LOG_DEBUG(("Start"));
i->client = client;
SilcIDCacheEntry id_cache;
SilcServerEntry entry;
+ assert(client && conn);
+ if (!server_name)
+ return NULL;
+
SILC_LOG_DEBUG(("Start"));
if (!silc_idcache_find_by_name_one(conn->internal->server_cache,
SilcIDCacheEntry id_cache;
SilcServerEntry entry;
+ assert(client && conn);
+ if (!server_id)
+ return NULL;
+
SILC_LOG_DEBUG(("Start"));
if (!silc_idcache_find_by_id_one(conn->internal->server_cache,