Updated to use new mod init stubs.
| 1 | /* |
| 2 | * The contents of this file are subject to the AOLserver Public License |
| 3 | * Version 1.1 (the "License"); you may not use this file except in |
| 4 | * compliance with the License. You may obtain a copy of the License at |
| 5 | * http://aolserver.com/. |
| 6 | * |
| 7 | * Software distributed under the License is distributed on an "AS IS" |
| 8 | * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See |
| 9 | * the License for the specific language governing rights and limitations |
| 10 | * under the License. |
| 11 | * |
| 12 | * The Original Code is AOLserver Code and related documentation |
| 13 | * distributed by AOL. |
| 14 | * |
| 15 | * The Initial Developer of the Original Code is America Online, |
| 16 | * Inc. Portions created by AOL are Copyright (C) 1999 America Online, |
| 17 | * Inc. All Rights Reserved. |
| 18 | * |
| 19 | * Alternatively, the contents of this file may be used under the terms |
| 20 | * of the GNU General Public License (the "GPL"), in which case the |
| 21 | * provisions of GPL are applicable instead of those above. If you wish |
| 22 | * to allow use of your version of this file only under the terms of the |
| 23 | * GPL and not to allow others to use your version of this file under the |
| 24 | * License, indicate your decision by deleting the provisions above and |
| 25 | * replace them with the notice and other provisions required by the GPL. |
| 26 | * If you do not delete the provisions above, a recipient may use your |
| 27 | * version of this file under either the License or the GPL. |
| 28 | */ |
| 29 | |
| 30 | /* |
| 31 | * nsdb.c -- |
| 32 | * |
| 33 | * Database module entry point. |
| 34 | */ |
| 35 | |
| 36 | static const char *RCSID = "@(#) $Header: /cvsroot-fuse/aolserver/aolserver/nsdb/nsdb.c,v 1.3 2005/08/08 11:32:17 jgdavidson Exp $, compiled: " __DATE__ " " __TIME__; |
| 37 | |
| 38 | #include "db.h" |
| 39 | |
| 40 | |
| 41 | /* |
| 42 | *---------------------------------------------------------------------- |
| 43 | * |
| 44 | * <a href="/cvs/aolserver/aolserver/nsdb/nsdb.c#A_NsDb_ModInit">NsDb_ModInit</a> -- |
| 45 | * |
| 46 | * Module initialization point. |
| 47 | * |
| 48 | * Results: |
| 49 | * NS_OK. |
| 50 | * |
| 51 | * Side effects: |
| 52 | * May load database drivers and configure pools. |
| 53 | * |
| 54 | *---------------------------------------------------------------------- |
| 55 | */ |
| 56 | |
| 57 | int |
| 58 | <a href="/cvs/aolserver/aolserver/nsdb/nsdb.c#A_NsDb_ModInit">NsDb_ModInit</a>(char *server, char *module) |
| 59 | { |
| 60 | static int once; |
| 61 | |
| 62 | if (server == NULL) { |
| 63 | <a href="/cvs/aolserver/aolserver/nsd/log.c#A_Ns_Log">Ns_Log</a>(Error, "%s: attempt to load outside a virual server", module); |
| 64 | return NS_ERROR; |
| 65 | } |
| 66 | if (!once) { |
| 67 | <a href="/cvs/aolserver/aolserver/nsdb/dbinit.c#A_NsDbInitPools">NsDbInitPools</a>(); |
| 68 | once = 1; |
| 69 | } |
| 70 | <a href="/cvs/aolserver/aolserver/nsdb/dbinit.c#A_NsDbInitServer">NsDbInitServer</a>(server); |
| 71 | return <a href="/cvs/aolserver/aolserver/nsd/tclinit.c#A_Ns_TclInitInterps">Ns_TclInitInterps</a>(server, <a href="/cvs/aolserver/aolserver/nsdb/dbtcl.c#A_NsDbAddCmds">NsDbAddCmds</a>, server); |
| 72 | } |
Copyright © 2010 Geeknet, Inc. All rights reserved. Terms of Use