On Sun, Sep 30, 2001 at 06:01:19PM +0200, Dirk Brockhausen wrote:
> Hi all,
> 
>  >mysql.c:157: `host' undeclared (first use in this function)
>  >mysql.c:157: (Each undeclared identifier is reported only once
>  >mysql.c:157: for each function it appears in.)
> 
> When I tried to install NTOP on Red Hat 6.2,
> I got the same error.
> 
>  From mysql.c:
> 
>     * Address is not set or in use atm. The user, passwd and name is
>     * hardcore programmed in this file..
> 
> 
> But where is "host" defined?
Try something like this:

--- ntop-010926.orig/ntop/mysql.c���Tue Sep 25 00:25:40 2001
+++ ntop-010926/ntop/mysql.c����Wed Sep 26 18:54:56 2001
@@ -47,7 +47,7 @@
 static pthread_mutex_t ntop_mysql_mutex;
 #endif
�
-int enable_mySQL = 0;
+/* int enable_mySQL = 0; */
 #ifdef MULTITHREADED
 int use_mutex;
 #endif
@@ -138,7 +138,7 @@
     };
�
     (*enableDBsupport) = 1;
-    open_mySQLsocket(userName, password, dbName);�
+    open_mySQLsocket(userName, password, dbName, host);
     enableDBSupportPtr = enableDBsupport;
     open_mySQLsocket(ntop_mysql_user, ntop_mysql_password, ntop_mysql_database,
 �������     ntop_mysql_host);
@@ -147,7 +147,7 @@
�
 /*-----------------------------------------------*/
�
-void open_mySQLsocket(char *userName, char* password, char* dbName) {
+void open_mySQLsocket(char *userName, char* password, char* dbName, char* host) {
 #ifdef MULTITHREADED
   if(use_mutex)  pthread_mutex_lock(&ntop_mysql_mutex);
 #endif


I'm currently using this patch for the new Debian packages I'm building.

ciao
    Dennis
-- 
"The Idea Is Good But The World Isn't Ready Yet"
_______________________________________________
Ntop-dev mailing list
[EMAIL PROTECTED]
http://listmanager.unipi.it/mailman/listinfo/ntop-dev

Reply via email to