- Timestamp:
- Dec 8, 2009, 11:25:50 PM (15 years ago)
- Location:
- trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/sh_forward.c
r252 r262 1990 1990 #include "zAVLTree.h" 1991 1991 1992 static char * sh_tolower (char * s) 1993 { 1994 char * ret = s; 1995 if (s) 1996 { 1997 for (; *s; ++s) 1998 { 1999 *s = tolower((unsigned char) *s); 2000 } 2001 } 2002 return ret; 2003 } 2004 1992 2005 /* Function to return the key for indexing 1993 2006 * the argument … … 2109 2122 newclt->status_arr[i] = CLT_INACTIVE; 2110 2123 (void) sh_unix_time(0, newclt->timestamp[CLT_INACTIVE], TIM_MAX); 2124 2111 2125 /* truncate */ 2112 2126 sl_strlcpy(newclt->hostname, &str[0], sep[0]+1); 2127 sh_tolower(newclt->hostname); 2128 2113 2129 /* truncate */ 2114 2130 sl_strlcpy(newclt->salt, &str[sep[0]+1], sep[1]-sep[0]); … … 2613 2629 */ 2614 2630 if (he != NULL && he->h_name != NULL) 2615 sl_strlcpy(h_name, he->h_name, MAXHOSTNAMELEN + 1); 2631 { 2632 sl_strlcpy(h_name, he->h_name, MAXHOSTNAMELEN + 1); 2633 } 2616 2634 else 2617 2635 { … … 2684 2702 } 2685 2703 2704 sh_tolower(h_peer); 2705 sh_tolower(h_name); 2686 2706 2687 2707 if ((0 == sl_strcmp(h_peer, h_name)) || (0 == sl_strcmp(h_peer_IP, h_name))) … … 2694 2714 while (he->h_aliases[i] != NULL) 2695 2715 { 2696 if (0 == sl_strcmp( he->h_aliases[i], h_name))2716 if (0 == sl_strcmp(sh_tolower(he->h_aliases[i]), h_name)) 2697 2717 { 2698 2718 flag = 1; … … 2794 2814 } 2795 2815 } 2816 2817 sh_tolower(search_string); 2796 2818 2797 2819 /* ---- search the register ----- -
trunk/src/sh_log_evalrule.c
r260 r262 682 682 683 683 int qpos = 0; 684 intrpos = 1;684 volatile int rpos = 1; 685 685 unsigned long dsec = 0; 686 686 char * dstr = NULL; -
trunk/src/sh_utmp.c
r259 r262 581 581 int errnum = 0; 582 582 583 if (sh.flag.checkSum != SH_CHECK_INIT) 584 sh_inotify_wait_for_change(mode_path[1], &inotify_watch, 585 &errnum, ShUtmpInterval); 586 583 if ( (sh.flag.isdaemon == S_TRUE || sh.flag.loop == S_TRUE) && 584 sh.flag.checkSum != SH_CHECK_INIT ) 585 { 586 sh_inotify_wait_for_change(mode_path[1], &inotify_watch, 587 &errnum, ShUtmpInterval); 588 } 589 587 590 lastcheck = tcurrent; 591 588 592 if (SH_INOTIFY_ERROR(errnum)) 589 593 {
Note:
See TracChangeset
for help on using the changeset viewer.