From 576393b8e2d8a3cb49055588cae02c271ad08bfb Mon Sep 17 00:00:00 2001 From: Pekka Riikonen Date: Sun, 24 Jun 2007 14:13:10 +0000 Subject: [PATCH] Comment, document and debug changes. --- lib/silcutil/silcdlist.h | 14 ++++++-------- lib/silcutil/silcnet.h | 2 +- lib/silcutil/unix/silcunixnet.c | 4 ++-- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/lib/silcutil/silcdlist.h b/lib/silcutil/silcdlist.h index 5b7a6ab6..87dfb4cc 100644 --- a/lib/silcutil/silcdlist.h +++ b/lib/silcutil/silcdlist.h @@ -4,7 +4,7 @@ Author: Pekka Riikonen - Copyright (C) 2000 - 2006 Pekka Riikonen + Copyright (C) 2000 - 2007 Pekka Riikonen This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -50,14 +50,12 @@ * Application defines this object and adds contexts to this list with * Dynamic List Interface functions. * - * SOURCE - */ + ***/ typedef struct SilcDListStruct { SilcList list; void *current; void *prev; } *SilcDList; -/***/ /* SilcDListEntry structure, one entry in the list. This MUST NOT be used directly by the application. */ @@ -239,22 +237,22 @@ SilcBool silc_dlist_insert(SilcDList list, void *context) * SYNOPSIS * * static inline - * void silc_dlist_del(SilcDList list, void *context); + * void silc_dlist_del(SilcDList list, void *entry); * * DESCRIPTION * - * Remove entry from the list. Returns < 0 on error, 0 otherwise. + * Remove entry from the list. * ***/ static inline -void silc_dlist_del(SilcDList list, void *context) +void silc_dlist_del(SilcDList list, void *entry) { SilcDListEntry e; silc_list_start(list->list); while ((e = (SilcDListEntry)silc_list_get(list->list)) != SILC_LIST_END) { - if (e->context == context) { + if (e->context == entry) { silc_list_del(list->list, e); #if defined(SILC_DEBUG) memset(e, 'F', sizeof(*e)); diff --git a/lib/silcutil/silcnet.h b/lib/silcutil/silcnet.h index ce4cdcc6..717e918c 100644 --- a/lib/silcutil/silcnet.h +++ b/lib/silcutil/silcnet.h @@ -118,7 +118,7 @@ typedef void (*SilcNetCallback)(SilcNetStatus status, * * This function creates TCP listener. This is used to create network * listener for incoming connections, and `callback' will be called - * everytime new connection is received. If `local_ip_addr' is NULL any + * everytime new connection is received. If `local_ip_addr' is NULL 'any' * address is used. If provided it can be used bind the listener to * `local_ip_count' many IP addresses provided in `local_ip_addr' table. * On success returns the SilcNetListener context, or NULL on error. diff --git a/lib/silcutil/unix/silcunixnet.c b/lib/silcutil/unix/silcunixnet.c index 96a2e37c..e0befdc1 100644 --- a/lib/silcutil/unix/silcunixnet.c +++ b/lib/silcutil/unix/silcunixnet.c @@ -164,8 +164,8 @@ silc_net_tcp_create_listener(const char **local_ip_addr, /* Bind to local addresses */ for (i = 0; i < local_ip_count; i++) { - SILC_LOG_DEBUG(("Binding to local address %s", - local_ip_addr ? local_ip_addr[i] : ipany)); + SILC_LOG_DEBUG(("Binding to local address %s:%d", + local_ip_addr ? local_ip_addr[i] : ipany, port)); /* Set sockaddr for server */ if (!silc_net_set_sockaddr(&server, -- 2.24.0