[NeoStats-Devel] [Commits] r2848 - trunk/src
[email protected] Fri, 30 Sep 2005 04:24:21 +1000
| Newsgroups | gmane.comp.neostats.devel |
|---|---|
| Message-ID | <[email protected]> |
Author: Mark
Date: Fri Sep 30 02:24:12 2005
New Revision: 2848
Modified:
trunk/src/main.c
trunk/src/misc.c
trunk/src/neostats.vcproj
trunk/src/nsdba.c
trunk/src/services.c
trunk/src/updates.c
Log:
fix Win32 build
Modified: trunk/src/main.c
==============================================================================
--- trunk/src/main.c (original)
+++ trunk/src/main.c Fri Sep 30 02:24:12 2005
@@ -446,8 +446,8 @@
/* Load modules after we fork. This fixes the load->fork-exit->call
_fini problems when we fork */
ConfLoadModules();
- /* Connect to server */
InitUpdate();
+ /* Connect to server */
Connect();
#ifdef WIN32
return EXIT_SUCCESS;
Modified: trunk/src/misc.c
==============================================================================
--- trunk/src/misc.c (original)
+++ trunk/src/misc.c Fri Sep 30 02:24:12 2005
@@ -751,4 +751,3 @@
return NS_FALSE;
return NS_TRUE;
}
-
Modified: trunk/src/neostats.vcproj
==============================================================================
--- trunk/src/neostats.vcproj (original)
+++ trunk/src/neostats.vcproj Fri Sep 30 02:24:12 2005
@@ -349,6 +349,12 @@
RelativePath=".\match.c">
</File>
<File
+ RelativePath=".\MiniMessage.c">
+ </File>
+ <File
+ RelativePath=".\MiniMessageGateway.c">
+ </File>
+ <File
RelativePath=".\misc.c">
</File>
<File
@@ -525,12 +531,21 @@
RelativePath="..\include\main.h">
</File>
<File
+ RelativePath="..\include\MiniMessage.h">
+ </File>
+ <File
+ RelativePath="..\include\MiniMessageGateway.h">
+ </File>
+ <File
RelativePath="..\include\modes.h">
</File>
<File
RelativePath="..\include\modules.h">
</File>
<File
+ RelativePath="..\include\MuscleSupport.h">
+ </File>
+ <File
RelativePath="..\include\neostats.h">
</File>
<File
Modified: trunk/src/nsdba.c
==============================================================================
--- trunk/src/nsdba.c (original)
+++ trunk/src/nsdba.c Fri Sep 30 02:24:12 2005
@@ -64,7 +64,6 @@
};
static hash_t *dbhash;
-static char dbname[MAXPATH];
static void *dbm_module_handle;
/** @brief InitDBAMSymbols
@@ -122,7 +121,6 @@
nlog( LOG_CRITICAL, "Unable to create db hash" );
return NS_FAILURE;
}
- DBAOpenDatabase();
return NS_SUCCESS;
}
@@ -145,15 +143,15 @@
hscan_t ts;
hash_scan_begin( &ds, dbhash );
- while( ( node = hash_scan_next( &ds ) ) != NULL )
+ while( ( node = hash_scan_next( &ds ) ) != NULL )
{
dbe = (dbentry *) hnode_get( node );
- dlog(DEBUG5, "Closing Database %s", dbe->name);
+ dlog( DEBUG5, "Closing Database %s", dbe->name );
hash_scan_begin( &ts, dbe->tablehash );
- while(( tnode = hash_scan_next( &ts ) ) != NULL )
+ while( ( tnode = hash_scan_next( &ts ) ) != NULL )
{
tbe = (tableentry *) hnode_get( tnode );
- dlog(DEBUG5, "Closing Table %s", tbe->name);
+ dlog( DEBUG5, "Closing Table %s", tbe->name );
DBACloseTable( tbe->table );
hash_scan_delete_destroy_node( dbe->tablehash, tnode );
ns_free( tbe );
@@ -193,7 +191,7 @@
nlog( LOG_CRITICAL, "DBAOpenDatabase: Unable to create table hash" );
return NS_FAILURE;
}
- hnode_create_insert( dbhash, dbe, dbe->name);
+ hnode_create_insert( dbhash, dbe, dbe->name );
return NS_SUCCESS;
}
@@ -219,12 +217,12 @@
if (node)
{
dbe = ( dbentry* )hnode_get( node );
- dlog(DEBUG5, "Closing Database %s", dbe->name);
+ dlog( DEBUG5, "Closing Database %s", dbe->name );
hash_scan_begin( &ts, dbe->tablehash );
- while(( tnode = hash_scan_next( &ts ) ) != NULL )
+ while( ( tnode = hash_scan_next( &ts ) ) != NULL )
{
tbe = (tableentry *) hnode_get( tnode );
- dlog(DEBUG5, "Closing Table %s", tbe->name);
+ dlog( DEBUG5, "Closing Table %s", tbe->name );
DBMCloseTable( tbe->handle );
hash_scan_delete_destroy_node( dbe->tablehash, tnode );
ns_free( tbe );
@@ -288,6 +286,7 @@
static tableentry *DBAFetchTableEntry( const char *table, int *islocalopen )
{
+ static char dbname[MAXPATH];
dbentry *dbe;
tableentry *tbe;
@@ -322,6 +321,7 @@
int DBACloseTable( const char *table )
{
+ static char dbname[MAXPATH];
dbentry *dbe;
tableentry *tbe;
hnode_t *node;
Modified: trunk/src/services.c
==============================================================================
--- trunk/src/services.c (original)
+++ trunk/src/services.c Fri Sep 30 02:24:12 2005
@@ -198,6 +198,7 @@
void InitServices( void )
{
+ DBAOpenDatabase();
ModuleConfig( ns_settings );
}
Modified: trunk/src/updates.c
==============================================================================
--- trunk/src/updates.c (original)
+++ trunk/src/updates.c Fri Sep 30 02:24:12 2005
@@ -29,7 +29,6 @@
#include "MiniMessage.h"
#include "MiniMessageGateway.h"
-
void GotUpdateAddress(void *data, adns_answer *a);
static int mqswrite(int fd, void *data);
static int mqsread(void *data, void *notused, size_t len);
@@ -45,6 +44,7 @@
int InitUpdate(void)
{
+#ifndef WIN32 /* DOES NOT WORK */
mqs.state = MQS_DISCONNECTED;
mqsgw = MGAllocMessageGateway();
if (!mqsgw) {
@@ -53,6 +53,7 @@
}
dns_lookup( mqs.hostname, adns_r_a, GotUpdateAddress, NULL );
dlog(DEBUG1, "Updates Initialized successfully");
+#endif /* WIN32 */
return NS_SUCCESS;
}
@@ -88,9 +89,11 @@
case MQS_SENTAUTH:
case MQS_OK:
/* ask MiniMessageGateway to write any buffer out */
+#ifndef WIN32 /*DOES NOT COMPILE, where is MQHasBytesToOutPut supposed to come from??? */
if (MQHasBytesToOutPut(mqsgw)) {
MGDoOutput(mqsgw, ~0, MQSSendSock, NULL);
}
+#endif /* WIN32 */
break;
}
return NS_FAILURE;