Exemplo n.º 1
0
int
main(int argc, char *argv[])
{
	const char *dbpath;
	rb_helper *bandb_helper;
	setup_signals();
	bandb_helper = rb_helper_child(parse_request, error_cb, NULL, NULL, NULL, 256);	
	if(bandb_helper == NULL)
	{
		fprintf(stderr,
			"This is ircd-ratbox bandb.  You aren't supposed to run me directly. Maybe you want bantool?\n");
		fprintf(stderr,
			"However I will print my Id tag $Id: bandb.c 28981 2015-11-03 01:58:58Z androsyn $\n");
		fprintf(stderr, "Have a nice day\n");
		exit(1);
	}
	dbpath = getenv("BANDB_DPATH");
	if(dbpath == NULL)
		dbpath = DBPATH;

	dbconn = rsdb_init(dbpath, db_error_cb, bandb_helper);
	if(dbconn == NULL)
	{
	        fprintf(stderr, "ircd-ratbox bandb reports it cannot open the database, giving up\n");
	        exit(1);
        }
	check_schema();
	rb_helper_loop(bandb_helper, 0);
}
Exemplo n.º 2
0
int
main(int argc, char *argv[])
{
    setup_signals();
    bandb_helper = rb_helper_child(parse_request, error_cb, NULL, NULL, NULL, 256, 256, 256);	/* XXX fix me */
    if(bandb_helper == NULL) {
        fprintf(stderr,
                "This is ircd-ratbox bandb.  You aren't supposed to run me directly. Maybe you want bantool?\n");
        fprintf(stderr,
                "However I will print my Id tag $Revision$\n");
        fprintf(stderr, "Have a nice day\n");
        exit(1);
    }
    rsdb_init(db_error_cb);
    check_schema();
    rb_helper_loop(bandb_helper, 0);

    return 0;
}