[pisa-src] r1143 - trunk/pairing/management.c

  • From: Tobias Heer <tobias.heer@xxxxxxxxxxxxxxxxx>
  • To: pisa-src@xxxxxxxxxxxxx
  • Date: Wed, 14 Oct 2009 15:49:36 +0200

Author: heer
Date: Wed Oct 14 15:49:36 2009
New Revision: 1143

Log:
Added todos for Jan

Modified:
   trunk/pairing/management.c

Modified: trunk/pairing/management.c
==============================================================================
--- trunk/pairing/management.c  Wed Oct 14 15:47:15 2009        (r1142)
+++ trunk/pairing/management.c  Wed Oct 14 15:49:36 2009        (r1143)
@@ -10,6 +10,9 @@
  * @date Aug. 2009
  */
 
+/* TODO JAN : insert code for locking
+ */
+
 #include <stdio.h>
 #include <unistd.h>
 #include <time.h>
@@ -97,6 +100,7 @@
 
 /**
  * Comparing userlist_entries means comparing their HITs
+ * TODO JAN
  */
 static int pisa_userlist_entry_compare_hit(const void *p1, const void *p2)
 {
@@ -114,6 +118,7 @@
 
 /**
  * Comparing userlist_entries means comparing the user_names
+ * TODO JAN
  */
 static int pisa_userlist_entry_compare_name(const void *p1, const void *p2)
 {
@@ -228,7 +233,7 @@
 
         merged_list->cur_slots++;
     }
-
+       /* mergesort: add remeining elements */
     while (i < ul->max_slots)
     {
         ulentry = &ul->entries[i];
@@ -270,9 +275,9 @@
 
     pisa_userlist_entry s;
 
-    if (!ul)
+    if (!ul){
         return 0;
-
+       }
     memcpy(&s.hit, hit, sizeof(s.hit));
 
     return (pisa_userlist_entry *)bsearch(&s, ul->entries, ul->cur_slots,
@@ -981,13 +986,14 @@
     }
 }
 
-/** Writes the users configuration.
+/** Writes the users configuration to config file.
  *
  *  @param hit HIT
  *  @param user_name User_name
  *  @param expiration Expiration of the Hit
  *  @param active The active status of the Entry (0: Deactivated, 1:Activated, 
2:No Change)
  *
+ * TODO JAN
  *  @return 0 on failure; 1 on success; -1 on write error
  */
 int pisa_mgmt_users_config_write(pisa_userhitlist_entry *new_entry)

Other related posts:

  • » [pisa-src] r1143 - trunk/pairing/management.c - Tobias Heer