[idms-dbma-devel]: COMMIT - r101 - in branches/nonblocking_io: include lib modules/protocols/imap4 m
Status: Pre-Alpha
Brought to you by:
nkukard
|
From: <sv...@li...> - 2005-05-05 10:18:55
|
Author: nkukard
Date: 2005-05-05 10:17:58 +0000 (Thu, 05 May 2005)
New Revision: 101
Modified:
branches/nonblocking_io/include/modules.h
branches/nonblocking_io/lib/modules.c
branches/nonblocking_io/modules/protocols/imap4/imap4.c
branches/nonblocking_io/modules/protocols/pop3/pop3.c
branches/nonblocking_io/modules/protocols/smtp/smtp.c
Log:
* Minor changes in some naming in modules
Modified: branches/nonblocking_io/include/modules.h
===================================================================
--- branches/nonblocking_io/include/modules.h 2005-04-28 18:07:52 UTC (rev 100)
+++ branches/nonblocking_io/include/modules.h 2005-05-05 10:17:58 UTC (rev 101)
@@ -38,6 +38,7 @@
#define PROTOCOL_MODULE 1
#define AUTH_MODULE 2
#define STORAGE_MODULE 3
+#define DISKIO_MODULE 4
@@ -46,15 +47,16 @@
{
unsigned int type;
void *cmdStruct;
- void *extraData;
+ void *moduleData;
};
+/* Protocol module stuff */
struct protoModule_t
{
unsigned short int listenPort;
};
-/* Protocol driver type */
+/* Protocol handling functions */
struct protoCmds_t
{
int (*startup) (struct clientConnection_t *connection);
Modified: branches/nonblocking_io/lib/modules.c
===================================================================
--- branches/nonblocking_io/lib/modules.c 2005-04-28 18:07:52 UTC (rev 100)
+++ branches/nonblocking_io/lib/modules.c 2005-05-05 10:17:58 UTC (rev 101)
@@ -1,6 +1,6 @@
/*
* modules.c - IDMS DBMA Module handling
- * Copyright (C) 2002-2004, Linux Based Systems Design
+ * Copyright (C) 2002-2005, Linux Based Systems Design
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -35,6 +35,7 @@
static GList *storageModuleList = NULL;
static GList *protoModuleList = NULL;
static GList *authModuleList = NULL;
+static GList *diskIOModuleList = NULL;
/* Return list of auth modules loaded, USE WITH CAUTION!!! */
@@ -54,9 +55,10 @@
{
void *dlHandle;
struct module_t *(*module_init)();
- struct module_t *moduleData;
+ struct module_t *module;
char *error;
+
/* Open .so & check */
//dlHandle = dlopen(filename,RTLD_LAZY);
dlHandle = dlopen(filename,RTLD_NOW);
@@ -74,31 +76,34 @@
}
/* Inialize driver */
- if (!(moduleData = module_init()))
+ if (!(module = module_init()))
{
d_printf(D_FATAL,"load_module()","Cannot initalize driver");
return NULL;
}
/* Decide what module we are and add it to that list */
- switch (moduleData->type)
+ switch (module->type)
{
case PROTOCOL_MODULE:
- protoModuleList = g_list_append(protoModuleList,moduleData);
+ protoModuleList = g_list_append(protoModuleList,module);
break;
case AUTH_MODULE:
- authModuleList = g_list_append(authModuleList,moduleData);
+ authModuleList = g_list_append(authModuleList,module);
break;
case STORAGE_MODULE:
- storageModuleList = g_list_append(storageModuleList,moduleData);
+ storageModuleList = g_list_append(storageModuleList,module);
break;
+ case DISKIO_MODULE:
+ diskIOModuleList = g_list_append(diskIOModuleList,module);
+ break;
default:
d_printf(D_NOTICE,"load_module()","Module type not recognized");
break;
}
/* Return module */
- return moduleData;
+ return module;
}
Modified: branches/nonblocking_io/modules/protocols/imap4/imap4.c
===================================================================
--- branches/nonblocking_io/modules/protocols/imap4/imap4.c 2005-04-28 18:07:52 UTC (rev 100)
+++ branches/nonblocking_io/modules/protocols/imap4/imap4.c 2005-05-05 10:17:58 UTC (rev 101)
@@ -374,7 +374,7 @@
myself->type = PROTOCOL_MODULE;
myself->cmdStruct = protoCmds;
- myself->extraData = protoModule;
+ myself->moduleData = protoModule;
protoCmds->startup = imap4_startup;
protoCmds->handler = imap4_handler;
Modified: branches/nonblocking_io/modules/protocols/pop3/pop3.c
===================================================================
--- branches/nonblocking_io/modules/protocols/pop3/pop3.c 2005-04-28 18:07:52 UTC (rev 100)
+++ branches/nonblocking_io/modules/protocols/pop3/pop3.c 2005-05-05 10:17:58 UTC (rev 101)
@@ -346,7 +346,7 @@
myself->type = PROTOCOL_MODULE;
myself->cmdStruct = protoCmds;
- myself->extraData = protoModule;
+ myself->moduleData = protoModule;
protoCmds->startup = pop3_startup;
protoCmds->handler = pop3_handler;
Modified: branches/nonblocking_io/modules/protocols/smtp/smtp.c
===================================================================
--- branches/nonblocking_io/modules/protocols/smtp/smtp.c 2005-04-28 18:07:52 UTC (rev 100)
+++ branches/nonblocking_io/modules/protocols/smtp/smtp.c 2005-05-05 10:17:58 UTC (rev 101)
@@ -402,7 +402,7 @@
myself->type = PROTOCOL_MODULE;
myself->cmdStruct = protoCmds;
- myself->extraData = protoModule;
+ myself->moduleData = protoModule;
protoCmds->startup = smtp_startup;
protoCmds->handler = smtp_handler;
|