Changeset 20 for trunk/src/sh_prelude.c


Ignore:
Timestamp:
Feb 13, 2006, 11:54:42 PM (19 years ago)
Author:
rainer
Message:

Enable command-line parsing for prelude, and make prelude regression test safer.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/sh_prelude.c

    r15 r20  
    5555#include <pwd.h>
    5656#include <grp.h>
     57
     58int     sh_argc_store;
     59char ** sh_argv_store;
    5760
    5861#if defined(HAVE_LIBPRELUDE) && defined(HAVE_LIBPRELUDE_9)
     
    933936        idmef_analyzer_t *analyzer;
    934937        prelude_client_flags_t flags;
     938#ifdef SH_NOFAILOVER
     939        prelude_connection_pool_t *pool;
     940        prelude_connection_pool_flags_t conn_flags;
     941#endif
    935942
    936943        if (ready_for_init == 0)
     
    941948
    942949        prelude_thread_init(NULL);
    943         prelude_init(NULL, NULL);
     950        prelude_init(&sh_argc_store, sh_argv_store);
    944951
    945952        ret = prelude_client_new(&client, profile ? profile : _("samhain"));
     
    968975        prelude_string_set_dup(str, IDMEF_ANALYZER_VERSION);
    969976       
     977#ifdef SH_NOFAILOVER
     978        pool = prelude_client_get_connection_pool(client);
     979        conn_flags = prelude_connection_pool_get_flags(pool);
     980
     981        conn_flags &= ~PRELUDE_CONNECTION_POOL_FLAGS_FAILOVER;
     982        prelude_connection_pool_set_flags(pool, conn_flags);
     983#endif
     984
    970985        ret = prelude_client_start(client);
    971986        if ( ret < 0 ) {
Note: See TracChangeset for help on using the changeset viewer.