Changeset 376


Ignore:
Timestamp:
Nov 1, 2011, 11:11:02 PM (13 years ago)
Author:
katerina
Message:

Fix some repetitive error messages.

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/sh_fInotify.c

    r373 r376  
    264264static void sh_fInotify_set_nwatches()
    265265{
    266   if (ShfInotifyWatches == 0)
     266  static int fails = 0;
     267
     268  if (ShfInotifyWatches == 0 || fails == 1)
    267269    return;
    268270
     
    303305                  _("sh_fInotify_set_nwatches"));
    304306  SH_MUTEX_UNLOCK(mutex_thread_nolog);
     307  fails = 1;
    305308  return;
    306309}
  • trunk/src/sh_portcheck.c

    r362 r376  
    17931793{
    17941794  volatile int min_port;
     1795  static int noprivports = 0;
    17951796
    17961797  SH_MUTEX_LOCK(mutex_port_check);
     
    18081809        {
    18091810          min_port = 1024;
     1811          if (noprivports == 0)
     1812            {
    18101813#ifdef TEST_ONLY
    1811           fprintf(stderr, "** WARNING not scanning ports < 1024\n");
    1812 #else
    1813           SH_MUTEX_LOCK(mutex_thread_nolog);
    1814           sh_error_handle(SH_ERR_ERR, FIL__, __LINE__, 0, MSG_E_SUBGEN,
    1815                           _("not scanning ports below 1024"),
    1816                           _("sh_portchk_check"));
    1817           SH_MUTEX_UNLOCK(mutex_thread_nolog);
    1818 #endif
     1814              fprintf(stderr, "** WARNING not scanning ports < 1024\n");
     1815#else
     1816              SH_MUTEX_LOCK(mutex_thread_nolog);
     1817              sh_error_handle(SH_ERR_ERR, FIL__, __LINE__, 0, MSG_E_SUBGEN,
     1818                              _("not scanning ports below 1024"),
     1819                              _("sh_portchk_check"));
     1820              SH_MUTEX_UNLOCK(mutex_thread_nolog);
     1821#endif
     1822              noprivports = 1;
     1823            }
    18191824        }
    18201825
Note: See TracChangeset for help on using the changeset viewer.