Univention Bugzilla – Attachment 8122 Details for
Bug 41842
write handle status after initialization
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
41842.diff
file_41842.txt (text/plain), 3.01 KB, created by
Philipp Hahn
on 2016-10-17 14:50 CEST
(
hide
)
Description:
41842.diff
Filename:
MIME Type:
Creator:
Philipp Hahn
Created:
2016-10-17 14:50 CEST
Size:
3.01 KB
patch
obsolete
>diff --git a/branches/ucs-4.1/ucs-4.1-3/management/univention-directory-listener/src/change.c b/branches/ucs-4.1/ucs-4.1-3/management/univention-directory-listener/src/change.c >index 28ca37f..0620132 100644 >--- a/branches/ucs-4.1/ucs-4.1-3/management/univention-directory-listener/src/change.c >+++ b/branches/ucs-4.1/ucs-4.1-3/management/univention-directory-listener/src/change.c >@@ -126,6 +126,7 @@ static int change_init_module(univention_ldap_parameters_t *lp, Handler *handler > > univention_debug(UV_DEBUG_LISTENER, UV_DEBUG_INFO, > "module %s for relating objects", handler->name); >+ rv = LDAP_SUCCESS; > for (f = handler->filters; !abort_init && f != NULL && *f != NULL; f++) { > /* When initializing a module, only search for the DNs. If the > entry for a DN is already in our cache, we use that one, >@@ -240,6 +240,8 @@ int change_new_modules(univention_ldap_parameters_t *lp) > handler->state |= HANDLER_INITIALIZED; > else > handler->state ^= HANDLER_READY; >+ >+ handler_write_state(handler); > } > } > INIT_ONLY = old_init_only; >diff --git a/branches/ucs-4.1/ucs-4.1-3/management/univention-directory-listener/src/handlers.c b/branches/ucs-4.1/ucs-4.1-3/management/univention-directory-listener/src/handlers.c >index c636ed3..7d89581 100644 >--- a/branches/ucs-4.1/ucs-4.1-3/management/univention-directory-listener/src/handlers.c >+++ b/branches/ucs-4.1/ucs-4.1-3/management/univention-directory-listener/src/handlers.c >@@ -535,19 +535,11 @@ static int handlers_load_all_paths(void) > } > > >-/* Free one handler. */ >-int handler_free(Handler *handler) >-{ >- char **a; >- struct filter **f; >+void handler_write_state(Handler *handler) { > char state_filename[PATH_MAX]; > FILE *state_fp; > int rv; > >- if ( handler == NULL || handler->name == NULL ) { >- return 0; >- } >- > /* write handler state */ > /* XXX: can be removed, once we use a database for this */ > rv = snprintf(state_filename, PATH_MAX, "%s/handlers/%s", cache_dir, handler->name); >@@ -560,6 +552,20 @@ int handler_free(Handler *handler) > fprintf(state_fp, "%d", handler->state); > fclose(state_fp); > } >+} >+ >+ >+/* Free one handler. */ >+int handler_free(Handler *handler) >+{ >+ char **a; >+ struct filter **f; >+ >+ if ( handler == NULL || handler->name == NULL ) { >+ return 0; >+ } >+ >+ handler_write_state(handler); > > /* free list node */ > free(handler->name); >diff --git a/branches/ucs-4.1/ucs-4.1-3/management/univention-directory-listener/src/handlers.h b/branches/ucs-4.1/ucs-4.1-3/management/univention-directory-listener/src/handlers.h >index b5f5ccc..32f89cf 100644 >--- a/branches/ucs-4.1/ucs-4.1-3/management/univention-directory-listener/src/handlers.h >+++ b/branches/ucs-4.1/ucs-4.1-3/management/univention-directory-listener/src/handlers.h >@@ -78,6 +78,7 @@ struct _Handler { > > int handlers_init (void); > int handlers_free_all (void); >+void handler_write_state(Handler *handler); > int handlers_load_path (char *filename); > int handlers_reload_all_paths (void); > int handlers_update (const char *dn,
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 41842
:
7825
| 8122