logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

nagiosplug/plugins check_pgsql.c,1.31,1.32: msg#00002

Subject: nagiosplug/plugins check_pgsql.c,1.31,1.32
Update of /cvsroot/nagiosplug/nagiosplug/plugins
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv18981

Modified Files:
        check_pgsql.c 
Log Message:
modify the is_pg_dbname() function to allow databases with '-' in their name.
reference: sf tracker #1500752


Index: check_pgsql.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_pgsql.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- check_pgsql.c       25 Dec 2004 23:17:44 -0000      1.31
+++ check_pgsql.c       6 Jun 2006 16:48:48 -0000       1.32
@@ -329,9 +329,9 @@
                return (FALSE);
        strncpy (txt, dbname, NAMEDATALEN - 1);
        txt[NAMEDATALEN - 1] = 0;
-       if (sscanf (txt, "%[_a-zA-Z]%[^_a-zA-Z0-9]", tmp, tmp) == 1)
+       if (sscanf (txt, "%[_a-zA-Z]%[^_a-zA-Z0-9-]", tmp, tmp) == 1)
                return (TRUE);
-       if (sscanf (txt, "%[_a-zA-Z]%[_a-zA-Z0-9]%[^_a-zA-Z0-9]", tmp, tmp, 
tmp) ==
+       if (sscanf (txt, "%[_a-zA-Z]%[_a-zA-Z0-9-]%[^_a-zA-Z0-9-]", tmp, tmp, 
tmp) ==
                        2) return (TRUE);
        return (FALSE);
 }


<Prev in Thread] Current Thread [Next in Thread>