Imported Upstream version 2.7
[ossec-hids.git] / src / os_dbd / server.c
index 79b5037..0f9f855 100755 (executable)
@@ -1,11 +1,12 @@
-/* @(#) $Id: server.c,v 1.7 2009/06/24 17:06:30 dcid Exp $ */
+/* @(#) $Id: ./src/os_dbd/server.c, 2011/09/08 dcid Exp $
+ */
 
 /* Copyright (C) 2009 Trend Micro Inc.
  * All rights reserved.
  *
  * This program is a free software; you can redistribute it
  * and/or modify it under the terms of the GNU General Public
- * License (version 3) as published by the FSF - Free Software
+ * License (version 2) as published by the FSF - Free Software
  * Foundation
  *
  * License details at the LICENSE file included with OSSEC or
@@ -50,14 +51,14 @@ int __DBSelectServer(char *server, DBConfig *db_config)
 int __DBInsertServer(char *server, char *info, DBConfig *db_config)
 {
     char sql_query[OS_SIZE_1024];
-    
+
     memset(sql_query, '\0', OS_SIZE_1024);
 
     /* Checking if the server is present */
     snprintf(sql_query, OS_SIZE_1024 -1,
             "SELECT id from server where hostname = '%s'",
             server);
-    
+
     /* If not present, we insert */
     if(osdb_query_select(db_config->conn, sql_query) == 0)
     {
@@ -105,10 +106,10 @@ int OS_Server_ReadInsertDB(void *db_config)
     int server_id = 0;
     char *info;
 
-   
+
     debug1("%s: DEBUG: entering OS_Server_ReadInsertDB()", ARGV0);
 
-    
+
     /* Getting servers hostname */
     memset(__shost, '\0', 512);
     if(gethostname(__shost, 512 -1) != 0)
@@ -138,8 +139,8 @@ int OS_Server_ReadInsertDB(void *db_config)
 
     /* Getting server id */
     server_id = __DBSelectServer(__shost, (DBConfig *)db_config);
-    
-    
+
+
     return(server_id);
 }