Comment, document and debug changes.
authorPekka Riikonen <priikone@silcnet.org>
Sun, 24 Jun 2007 14:13:10 +0000 (14:13 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Sun, 24 Jun 2007 14:13:10 +0000 (14:13 +0000)
lib/silcutil/silcdlist.h
lib/silcutil/silcnet.h
lib/silcutil/unix/silcunixnet.c

index 5b7a6ab69dfda2010bb88fd607ad956743959003..87dfb4cce6cb26871b4602d23153cd55a0e8934d 100644 (file)
@@ -4,7 +4,7 @@
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
-  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
  *    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));
index ce4cdcc62d3561974cd2b5a43e85e8e816b3aa09..717e918c28ecc4d776569b3558fad5080ab27a0d 100644 (file)
@@ -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.
index 96a2e37cc59bee438507c247ded9e776dc1baf52..e0befdc19979ca325a83cd39b6da9015e34a28f8 100644 (file)
@@ -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,