View | Details | Raw Unified | Return to bug 27314
Collapse All | Expand All

(-)a/branches/ucs-3.0/ucs/management/univention-directory-listener/src/cache_lowlevel.c (-1 / +4 lines)
 Lines 199-204   int parse_entry(void *data, u_int32_t size, CacheEntry *entry) Link Here 
199
	void *key_data, *data_data;
199
	void *key_data, *data_data;
200
	u_int32_t key_size, data_size;
200
	u_int32_t key_size, data_size;
201
	u_int32_t pos=0;
201
	u_int32_t pos=0;
202
	char *f;
202
203
203
	entry->attributes=NULL;
204
	entry->attributes=NULL;
204
	entry->attribute_count=0;
205
	entry->attribute_count=0;
 Lines 260-269   int parse_entry(void *data, u_int32_t size, CacheEntry *entry) Link Here 
260
			univention_debug(UV_DEBUG_LISTENER, UV_DEBUG_ERROR, "first 100 bytes of current entry:");
261
			univention_debug(UV_DEBUG_LISTENER, UV_DEBUG_ERROR, "first 100 bytes of current entry:");
261
			hex_dump(UV_DEBUG_ERROR, data, pos, pos+1000 > size ? size-pos : 1000);
262
			hex_dump(UV_DEBUG_ERROR, data, pos, pos+1000 > size ? size-pos : 1000);
262
263
263
			if ((file=fopen("/var/lib/univention-directory-listener/bad_cache", "w")) != NULL) {
264
			if (asprintf(&f, "%s/bad_cache", cache_dir) < 0) abort();
265
			if ((file = fopen(f, "w")) != NULL) {
264
				fprintf(file, "Check log file");
266
				fprintf(file, "Check log file");
265
				fclose(file);
267
				fclose(file);
266
			}
268
			}
269
			free(f);
267
270
268
			return -1;
271
			return -1;
269
		}
272
		}
(-)a/branches/ucs-3.0/ucs/management/univention-directory-listener/src/cache_lowlevel.h (+2 lines)
 Lines 35-40    Link Here 
35
35
36
#include "cache.h"
36
#include "cache.h"
37
37
38
extern char *cache_dir;
39
38
int	unparse_entry	(void		**data,
40
int	unparse_entry	(void		**data,
39
			 u_int32_t	 *size,
41
			 u_int32_t	 *size,
40
			 CacheEntry	 *entry);
42
			 CacheEntry	 *entry);
(-)a/branches/ucs-3.0/ucs/management/univention-directory-listener/src/handlers.c (-1 lines)
 Lines 57-63   PyObject* handlers_argtuple(char *dn, CacheEntry *new, CacheEntry *old); Link Here 
57
PyObject* handlers_argtuple_command(char *dn, CacheEntry *new, CacheEntry *old, char *command);
57
PyObject* handlers_argtuple_command(char *dn, CacheEntry *new, CacheEntry *old, char *command);
58
58
59
extern int INIT_ONLY;
59
extern int INIT_ONLY;
60
extern char *cache_dir;
61
extern char **module_dirs;
60
extern char **module_dirs;
62
extern int module_dir_count;
61
extern int module_dir_count;
63
62
(-)a/branches/ucs-3.0/ucs/management/univention-directory-listener/src/main.c (-5 / +7 lines)
 Lines 335-344   int main(int argc, char* argv[]) Link Here 
335
	CacheMasterEntry		 master_entry;
335
	CacheMasterEntry		 master_entry;
336
#endif
336
#endif
337
	struct stat			 stbuf;
337
	struct stat			 stbuf;
338
338
	char *f = NULL;
339
	if (stat("/var/lib/univention-directory-listener/bad_cache", &stbuf) == 0) {
340
		exit(3);
341
	}
342
339
343
	univention_debug_init("stderr", 1, 1);
340
	univention_debug_init("stderr", 1, 1);
344
341
 Lines 451-456   int main(int argc, char* argv[]) Link Here 
451
		}
448
		}
452
	}
449
	}
453
450
451
	if (asprintf(&f, "%s/bad_cache", cache_dir) < 0) abort();
452
	if (stat(f, &stbuf) == 0) {
453
		exit(3);
454
	}
455
	free(f);
456
454
	univention_debug_set_level(UV_DEBUG_LISTENER, debugging);
457
	univention_debug_set_level(UV_DEBUG_LISTENER, debugging);
455
	univention_debug_set_level(UV_DEBUG_LDAP, debugging);
458
	univention_debug_set_level(UV_DEBUG_LDAP, debugging);
456
	univention_debug_set_level(UV_DEBUG_KERBEROS, debugging);
459
	univention_debug_set_level(UV_DEBUG_KERBEROS, debugging);
457
- 

Return to bug 27314