Export rx_Finalize and rx_InitHost
====================
This delta was composed from multiple commits as part of the CVS->Git migration.
The checkin message with each commit was inconsistent.
The following are the additional commit messages.
====================
* add afs_winsockCleanup() call to rx_Finalize
* do not start listener threads multiple times
====================
* export rx_Finalize and pr_End
====================
afs_winsockCleanup
PR_ListSuperGroups @108
ka_AuthSpecificServersConn @109
ka_KeyCheckSum @110
+ rx_Finalize @111
+ rx_InitHost @112
}
rxi_flushtrace();
+#ifdef AFS_NT40_ENV
+ afs_winsockCleanup();
+#endif
+
rxinit_status = 1;
UNLOCK_RX_INIT;
}
void
rxi_InitializeThreadSupport(void)
{
- listeners_started = 0;
+ /* listeners_started must only be reset if
+ * the listener thread terminates */
+ /* listeners_started = 0; */
clock_GetTime(&rxi_clockNow);
}
pthread_attr_t tattr;
AFS_SIGSET_DECL;
+ if (listeners_started)
+ return;
+
if (pthread_attr_init(&tattr) != 0) {
dpf
(("Unable to create Rx event handling thread (pthread_attr_init)\n"));
DISK_function_names @83 DATA
VOTE_function_names @84 DATA
+ rx_Finalize @85
+ pr_End @86
/* Initialize the windows sockets before calling networking routines. */
extern int afs_winsockInit(void);
+ extern void afs_winsockCleanup(void);
struct timezone {
int tz_minuteswest; /* of Greenwich */
*
* Returns 0 on success, -1 on error.
*/
+static int once = 1;
+
int
afs_winsockInit(void)
{
- static int once = 1;
-
if (once) {
int code;
WSADATA data;
return 0;
}
+void
+afs_winsockCleanup(void)
+{
+ WSACleanup();
+ once = 0;
+}
+
/* This function will begin to fail in the year 2038 */
int
afs_gettimeofday(struct timeval *tv, struct timezone *tz)