/****************************************************************************/
/* Copyright (c) 2000 MBARI                                                 */
/* MBARI Proprietary Information. All rights reserved.                      */
/****************************************************************************/
/* Summary  :                                                               */
/* Filename : _gncServer.cc                                                 */
/* Author   :                                                               */
/* Project  :                                                               */
/* Version  : 1.0                                                           */
/* Created  : 02/07/2000                                                    */
/* Modified :                                                               */
/* Archived :                                                               */
/****************************************************************************/
/* Modification History:                                                    */
/****************************************************************************/
#include "GncServer.h"
#include "Syslog.h"
#include "System.h"

int main(int argc, char **argv)
{
    Boolean debug = True;
    GncServer *server = 0;
    
    // Set task priority
    if (System::setTaskPriority(GncServerPriority) == -1)
        return 1;
    
    try {
        dprintf("Creating GncServer...\n");
        server = new GncServer(argc, argv);
        dprintf("Done creating GncServer...\n");
    }
    catch (...) {
        Syslog::write("Caught something from GncServer constructor!\n");
        return -1;
    }
    
    try {
        server->run();
        delete server;
    }
    catch (...) {
        Syslog::write("Caught something from GncServer::run()!\n");
        return -1;
    }
    
    
    return 0;
}

