[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue/geas/src geas-server.c
From: |
Neil Tiffin |
Subject: |
gnue/geas/src geas-server.c |
Date: |
Mon, 04 Jun 2001 06:53:22 -0700 |
CVSROOT: /home/cvs
Module name: gnue
Changes by: Neil Tiffin <address@hidden> 01/06/04 06:53:22
Modified files:
geas/src : geas-server.c
Log message:
Added error messages for not finding reserved word files and also added
some asserts.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/geas/src/geas-server.c.diff?cvsroot=OldCVS&tr1=1.93&tr2=1.94&r1=text&r2=text
Patches:
Index: gnue/geas/src/geas-server.c
diff -u gnue/geas/src/geas-server.c:1.93 gnue/geas/src/geas-server.c:1.94
--- gnue/geas/src/geas-server.c:1.93 Sat Jun 2 06:17:10 2001
+++ gnue/geas/src/geas-server.c Mon Jun 4 06:53:22 2001
@@ -19,7 +19,7 @@
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- $Id: geas-server.c,v 1.93 2001/06/02 13:17:10 ntiffin Exp $
+ $Id: geas-server.c,v 1.94 2001/06/04 13:53:22 ntiffin Exp $
*/
@@ -260,14 +260,19 @@
/* note: classes must be loaded */
message ("Initialising business class method handling.");
- initialise_method_handling (configdata);
- i = load_method_handlers ( NULL );
- if (i != 0)
+ if (initialise_method_handling (configdata))
{
- errormsg ("%d method handler%s could not be initialised.", i,
- (i == 1 ? "" : "s"));
+ i = load_method_handlers ( configdata );
+ if (i != 0)
+ {
+ errormsg ("%d method handler%s could not be initialised.", i,
+ (i == 1 ? "" : "s"));
+ }
}
-
+ else
+ {
+ errormsg ("Method handling not supported initialised.");
+ }
message ("Initialising object store.");
initialise_objectstore (configdata);
@@ -362,6 +367,7 @@
/* create a connection for GEAS to use when talking to itself :) */
server_connection_id = g_new0 (GEAS_object_reference, 1);
+ g_assert( server_connection_id != NULL );
if (server_connection_id)
{
server_connection_id->listid = NULL;
@@ -1402,7 +1408,9 @@
trace_functioncall ();
fp = fopen (file, "r");
+ g_assert( fp != NULL);
if (!fp)
+ printf("Error: Opening reserved SQL words file %s, error number %d.\n",
file, errno);
return;
while (!feof (fp))
@@ -1433,7 +1441,7 @@
}
fclose (fp);
- /*
+#if 0
printf( "%s %s reserved in %s\n" ,
"position" , is_word_reserved("position",OQL_DBTYPE_MYSQL)?"is":"isn't" ,
"MySQL" );
printf( "%s %s reserved in %s\n" ,
@@ -1443,7 +1451,7 @@
"position" ,
is_word_reserved("position",OQL_DBTYPE_POSTGRESQL)?"is":"isn't" , "PostgreSQL"
);
printf( "%s %s reserved in %s\n" ,
"all" , is_word_reserved("all",OQL_DBTYPE_POSTGRESQL)?"is":"isn't" ,
"PostgreSQL" );
- */
+#endif
}
struct DatabaseAliases
@@ -1474,6 +1482,7 @@
make_database_alias (const char *name)
{
struct DatabaseAliases *d = g_new0 (struct DatabaseAliases, 1);
+ g_assert( d != NULL);
if (d)
{
d->databasename = g_strdup (name);
@@ -1488,6 +1497,7 @@
gboolean modifyable, const char *pkey)
{
struct TableAlias *a = g_new0 (struct TableAlias, 1);
+ g_assert( a != NULL );
if (a)
{
a->classname = g_strdup (classname);
@@ -1503,6 +1513,9 @@
const char *fieldname, const char *columnname)
{
struct ColumnAlias *c = g_new0 (struct ColumnAlias, 1);
+ g_assert( fieldname != NULL );
+ g_assert( columnname != NULL );
+ g_assert( table != NULL );
if (c)
{
c->table = table;
- gnue/geas/src geas-server.c,
Neil Tiffin <=