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

(-)a/management/univention-directory-notifier/debian/univention-directory-notifier.postinst (-1 / +3 lines)
 Lines 36-42   univention-config-registry set notifier/autostart?yes Link Here 
36
36
37
#DEBHELPER#
37
#DEBHELPER#
38
38
39
install -m0700 -o0 -g0 -d /var/lib/univention-ldap/notify
39
if [ ! -e /var/lib/univention-ldap/notify ]; then
40
	install -m0700 -o0 -g0 -d /var/lib/univention-ldap/notify
41
fi
40
42
41
if [ ! -d /var/lib/univention-ldap/schema ]; then
43
if [ ! -d /var/lib/univention-ldap/schema ]; then
42
	mkdir -p /var/lib/univention-ldap/schema
44
	mkdir -p /var/lib/univention-ldap/schema
(-)a/management/univention-directory-notifier/src/network.h (-1 / +1 lines)
 Lines 60-66   typedef struct network_client { Link Here 
60
60
61
}NetworkClient_t;
61
}NetworkClient_t;
62
62
63
int network_create_socket();
63
int network_create_socket( int port );
64
64
65
int network_client_del ( int fd );
65
int network_client_del ( int fd );
66
66
(-)a/management/univention-directory-notifier/src/notify.c (-5 / +5 lines)
 Lines 557-565   char* notify_entry_to_string(NotifyEntry_t entry ) Link Here 
557
		return NULL;
557
		return NULL;
558
	}
558
	}
559
559
560
		len += 4; /* space + space + newline */
560
	len += 4; /* space + space + newline */
561
		len += strlen(entry.dn);
561
	len += strlen(entry.dn);
562
		len += snprintf(buffer,32, "%ld",entry.notify_id.id);
562
	len += snprintf(buffer,32, "%ld",entry.notify_id.id);
563
563
564
	len+=1;
564
	len+=1;
565
	if ( (str = malloc(len*sizeof(char) ) ) == NULL ) {
565
	if ( (str = malloc(len*sizeof(char) ) ) == NULL ) {
 Lines 569-576   char* notify_entry_to_string(NotifyEntry_t entry ) Link Here 
569
	memset(str, 0, len);
569
	memset(str, 0, len);
570
	p=str;
570
	p=str;
571
571
572
			rc = sprintf(p, "%ld %s %c\n", entry.notify_id.id, entry.dn, entry.command);
572
	rc = sprintf(p, "%ld %s %c\n", entry.notify_id.id, entry.dn, entry.command);
573
			p+=rc;
573
	p+=rc;
574
574
575
	return str;
575
	return str;
576
576
(-)a/management/univention-directory-notifier/src/univention-directory-notifier.c (-2 / +2 lines)
 Lines 228-237   int main(int argc, char* argv[]) Link Here 
228
228
229
	network_client_init( 6669 );
229
	network_client_init( 6669 );
230
230
231
		create_callback_listener ();
231
	create_callback_listener ();
232
	create_callback_schema ();
232
	create_callback_schema ();
233
233
234
		notify_listener_change_callback ( 0, NULL, NULL);
234
	notify_listener_change_callback ( 0, NULL, NULL);
235
	notify_schema_change_callback ( 0, NULL, NULL);
235
	notify_schema_change_callback ( 0, NULL, NULL);
236
236
237
	network_client_main_loop( );
237
	network_client_main_loop( );

Return to bug 49277