summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f6c23c8)
raw | patch | inline | side by side (parent: f6c23c8)
author | Florian Forster <sifnfors@informatik.stud.uni-erlangen.de> | |
Mon, 16 Mar 2009 15:15:11 +0000 (16:15 +0100) | ||
committer | Florian Forster <sifnfors@informatik.stud.uni-erlangen.de> | |
Mon, 16 Mar 2009 15:15:11 +0000 (16:15 +0100) |
src/java.c | patch | blob | history | |
src/plugin.c | patch | blob | history | |
src/plugin.h | patch | blob | history |
diff --git a/src/java.c b/src/java.c
index c6d4aeef1e5881a3fb684a43478c9b3b19c95569..243e8f1e8a4c0801ec3c365942474ba1539a2af0 100644 (file)
--- a/src/java.c
+++ b/src/java.c
ud.data = (void *) cbi;
ud.free_func = cjni_callback_info_destroy;
- plugin_register_complex_read (cbi->name, cjni_read, &ud);
+ plugin_register_complex_read (cbi->name, cjni_read,
+ /* interval = */ NULL, &ud);
(*jvm_env)->DeleteLocalRef (jvm_env, o_read);
diff --git a/src/plugin.c b/src/plugin.c
index 8fdd7bba8fde7cf29f07d6b65d53064b753300e6..5a7a52a2984d2007b66209176ef17f3f86383858 100644 (file)
--- a/src/plugin.c
+++ b/src/plugin.c
} /* int plugin_register_read */
int plugin_register_complex_read (const char *name,
- plugin_read_cb callback, user_data_t *user_data)
+ plugin_read_cb callback,
+ const struct timespec *interval,
+ user_data_t *user_data)
{
read_func_t *rf;
rf->rf_callback = (void *) callback;
sstrncpy (rf->rf_name, name, sizeof (rf->rf_name));
rf->rf_type = RF_COMPLEX;
- rf->rf_interval.tv_sec = 0;
- rf->rf_interval.tv_nsec = 0;
+ if (interval != NULL)
+ {
+ rf->rf_interval = *interval;
+ }
rf->rf_effective_interval = rf->rf_interval;
/* Set user data */
diff --git a/src/plugin.h b/src/plugin.h
index bc4b07c2258f01b0eb9f4fcef591d9eafe774a78..e54b27d69e554628060e08f686e18aa76a45fe70 100644 (file)
--- a/src/plugin.h
+++ b/src/plugin.h
int plugin_register_read (const char *name,
int (*callback) (void));
int plugin_register_complex_read (const char *name,
- plugin_read_cb callback, user_data_t *user_data);
+ plugin_read_cb callback,
+ const struct timespec *interval,
+ user_data_t *user_data);
int plugin_register_write (const char *name,
plugin_write_cb callback, user_data_t *user_data);
int plugin_register_flush (const char *name,