[BACK]Return to table.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / libexec / talkd

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/libexec/talkd/table.c between version 1.8.10.1 and 1.9

version 1.8.10.1, 2009/05/13 19:18:43 version 1.9, 2009/03/16 01:04:32
Line 50  __RCSID("$NetBSD$");
Line 50  __RCSID("$NetBSD$");
 #include <sys/time.h>  #include <sys/time.h>
 #include <sys/socket.h>  #include <sys/socket.h>
 #include <protocols/talkd.h>  #include <protocols/talkd.h>
 #include <inttypes.h>  
 #include <syslog.h>  #include <syslog.h>
 #include <unistd.h>  #include <unistd.h>
 #include <stdio.h>  #include <stdio.h>
Line 179  insert_table(CTL_MSG *request, CTL_RESPO
Line 178  insert_table(CTL_MSG *request, CTL_RESPO
 /*  /*
  * Generate a unique non-zero sequence number   * Generate a unique non-zero sequence number
  */   */
 uint32_t  int
 new_id(void)  new_id(void)
 {  {
         static uint32_t current_id = 0;          static int current_id = 0;
   
         current_id = (current_id + 1) % MAX_ID;          current_id = (current_id + 1) % MAX_ID;
         /* 0 is reserved, helps to pick up bugs */          /* 0 is reserved, helps to pick up bugs */
Line 194  new_id(void)
Line 193  new_id(void)
 /*  /*
  * Delete the invitation with id 'id_num'   * Delete the invitation with id 'id_num'
  */   */
 u_char  int
 delete_invite(uint32_t id_num)  delete_invite(int id_num)
 {  {
         TABLE_ENTRY *ptr;          TABLE_ENTRY *ptr;
   
         ptr = table;          ptr = table;
         if (debug)          if (debug)
                 syslog(LOG_DEBUG, "delete_invite(%"PRIu32")", id_num);                  syslog(LOG_DEBUG, "delete_invite(%d)", id_num);
         for (ptr = table; ptr != NIL; ptr = ptr->next) {          for (ptr = table; ptr != NIL; ptr = ptr->next) {
                 if (ptr->request.id_num == id_num)                  if (ptr->request.id_num == id_num)
                         break;                          break;

Legend:
Removed from v.1.8.10.1  
changed lines
  Added in v.1.9

CVSweb <webmaster@jp.NetBSD.org>