54
54
#include "misc.h"
55
55
#include "ldapserver.h"
56
56
#include "asshelp.h"
57
+ #include "ldap-wrapper.h"
57
58
58
59
/* The plain Windows version uses the windows service system. For
59
60
example to start the service you may use "sc start dirmngr".
@@ -393,32 +394,6 @@ wrong_args (const char *text)
393
394
}
394
395
395
396
396
- /* Helper to start the reaper thread for the ldap wrapper. */
397
- static void
398
- launch_reaper_thread (void )
399
- {
400
- static int done ;
401
- pth_attr_t tattr ;
402
-
403
- if (done )
404
- return ;
405
- done = 1 ;
406
-
407
- tattr = pth_attr_new ();
408
- pth_attr_set (tattr , PTH_ATTR_JOINABLE , 0 );
409
- pth_attr_set (tattr , PTH_ATTR_STACK_SIZE , 256 * 1024 );
410
- pth_attr_set (tattr , PTH_ATTR_NAME , "ldap-reaper" );
411
-
412
- if (!pth_spawn (tattr , ldap_wrapper_thread , NULL ))
413
- {
414
- log_error (_ ("error spawning ldap wrapper reaper thread: %s\n" ),
415
- strerror (errno ) );
416
- dirmngr_exit (1 );
417
- }
418
- pth_attr_destroy (tattr );
419
- }
420
-
421
-
422
397
/* Helper to stop the reaper thread for the ldap wrapper. */
423
398
static void
424
399
shutdown_reaper (void )
@@ -938,7 +913,7 @@ main (int argc, char **argv)
938
913
log_debug ("... okay\n" );
939
914
}
940
915
941
- launch_reaper_thread ();
916
+ ldap_wrapper_launch_thread ();
942
917
cert_cache_init ();
943
918
crl_cache_init ();
944
919
start_command_handler (ASSUAN_INVALID_FD );
@@ -1101,7 +1076,7 @@ main (int argc, char **argv)
1101
1076
}
1102
1077
#endif
1103
1078
1104
- launch_reaper_thread ();
1079
+ ldap_wrapper_launch_thread ();
1105
1080
cert_cache_init ();
1106
1081
crl_cache_init ();
1107
1082
#ifdef USE_W32_SERVICE
@@ -1127,7 +1102,7 @@ main (int argc, char **argv)
1127
1102
/* Just list the CRL cache and exit. */
1128
1103
if (argc )
1129
1104
wrong_args ("--list-crls" );
1130
- launch_reaper_thread ();
1105
+ ldap_wrapper_launch_thread ();
1131
1106
crl_cache_init ();
1132
1107
crl_cache_list (es_stdout );
1133
1108
}
@@ -1138,7 +1113,7 @@ main (int argc, char **argv)
1138
1113
memset (& ctrlbuf , 0 , sizeof ctrlbuf );
1139
1114
dirmngr_init_default_ctrl (& ctrlbuf );
1140
1115
1141
- launch_reaper_thread ();
1116
+ ldap_wrapper_launch_thread ();
1142
1117
cert_cache_init ();
1143
1118
crl_cache_init ();
1144
1119
if (!argc )
@@ -1160,7 +1135,7 @@ main (int argc, char **argv)
1160
1135
memset (& ctrlbuf , 0 , sizeof ctrlbuf );
1161
1136
dirmngr_init_default_ctrl (& ctrlbuf );
1162
1137
1163
- launch_reaper_thread ();
1138
+ ldap_wrapper_launch_thread ();
1164
1139
cert_cache_init ();
1165
1140
crl_cache_init ();
1166
1141
rc = crl_fetch (& ctrlbuf , argv [0 ], & reader );
0 commit comments