svn rev #23975: branches/plugins/src/ lib/krb5/ plugin_core/ plugin_core/impl/

tsitkova@MIT.EDU tsitkova at MIT.EDU
Fri May 7 12:57:20 EDT 2010


http://src.mit.edu/fisheye/changelog/krb5/?cs=23975
Commit By: tsitkova
Log Message:
Changed the type of "void *data" to " manager_data * data" in plugin_manager.
Also, made path to yaml config file conditional in krb5_libinit.c



Changed Files:
U   branches/plugins/src/lib/krb5/krb5_libinit.c
U   branches/plugins/src/plugin_core/impl/plugin_default_manager.c
U   branches/plugins/src/plugin_core/impl/plugin_default_manager.h
U   branches/plugins/src/plugin_core/plugin_manager.h
Modified: branches/plugins/src/lib/krb5/krb5_libinit.c
===================================================================
--- branches/plugins/src/lib/krb5/krb5_libinit.c	2010-05-07 15:15:17 UTC (rev 23974)
+++ branches/plugins/src/lib/krb5/krb5_libinit.c	2010-05-07 16:57:20 UTC (rev 23975)
@@ -31,8 +31,11 @@
 {
     int err;
     plugin_manager* default_manager;
+#ifdef CONFIG_IN_YAML
     const char conf_path[] = "/tmp/plugin_conf.yml";
-
+#else
+    const char conf_path[] = ""; // need to be something meaningful. os_get_default_config_files?
+#endif
     krb5int_set_error_info_callout_fn (error_message);
 
 #ifdef SHOW_INITFINI_FUNCS

Modified: branches/plugins/src/plugin_core/impl/plugin_default_manager.c
===================================================================
--- branches/plugins/src/plugin_core/impl/plugin_default_manager.c	2010-05-07 15:15:17 UTC (rev 23974)
+++ branches/plugins/src/plugin_core/impl/plugin_default_manager.c	2010-05-07 16:57:20 UTC (rev 23975)
@@ -205,7 +205,7 @@
 /* krb5.conf */
 
 static void
-_configure_krb5(void* data, const char* path)
+_configure_krb5(manager_data* data, const char* path)
 {
     manager_data* mdata = (manager_data*) data;
     krb5_error_code retval;
@@ -289,19 +289,19 @@
 #endif
 
 static void
-_start(void* data)
+_start(manager_data* data)
 {
     return;
 }
 
 static void
-_stop(void* data)
+_stop(manager_data* data)
 {
     return;
 }
 
 static plhandle
-_getService(void* data, const char* service_name)
+_getService(manager_data* data, const char* service_name)
 {
     plhandle handle;
     manager_data* mdata = (manager_data*) data;

Modified: branches/plugins/src/plugin_core/impl/plugin_default_manager.h
===================================================================
--- branches/plugins/src/plugin_core/impl/plugin_default_manager.h	2010-05-07 15:15:17 UTC (rev 23974)
+++ branches/plugins/src/plugin_core/impl/plugin_default_manager.h	2010-05-07 16:57:20 UTC (rev 23975)
@@ -7,7 +7,7 @@
 #define PLUGIN_DEFAULT_MANAGER_H_
 
 #include <plugin_manager.h>
-
+#if 0
 typedef struct {
     char api_name[512];
     plhandle* first;
@@ -24,6 +24,7 @@
 typedef struct {
     registry_data* registry;
 } manager_data;
+#endif
 
 plugin_manager* plugin_default_manager_get_instance(void);
 

Modified: branches/plugins/src/plugin_core/plugin_manager.h
===================================================================
--- branches/plugins/src/plugin_core/plugin_manager.h	2010-05-07 15:15:17 UTC (rev 23974)
+++ branches/plugins/src/plugin_core/plugin_manager.h	2010-05-07 16:57:20 UTC (rev 23975)
@@ -9,11 +9,28 @@
 #include <k5-int.h>
 
 typedef struct {
-	void* data;
-	void (*configure)(void* data, const char*);
-	void (*start)(void* data);
-	void (*stop)(void* data);
-	plhandle (*getService)(void* data, const char*);
+    char api_name[512];
+    plhandle* first;
+    plhandle* last;
+    int size;
+} reg_entry;
+
+typedef struct {
+    reg_entry* table;
+    long registry_size;
+    long registry_max_size;
+} registry_data;
+
+typedef struct {
+    registry_data* registry;
+} manager_data;
+
+typedef struct {
+	manager_data * data;
+	void (*configure)(manager_data *  data, const char*);
+	void (*start)(manager_data * data);
+	void (*stop)(manager_data * data);
+	plhandle (*getService)(manager_data * data, const char*);
 } plugin_manager;
 
 void set_plugin_manager_instance(plugin_manager*);




More information about the cvs-krb5 mailing list