Ejemplo n.º 1
0
void cleanUpAndExit()
{
	printf("\nShutting down.\n\n");

	providerWaitForThreads(&provider);

	/* Collect final stats before writing summary. */
	providerCollectStats(&provider, RSSL_FALSE, RSSL_FALSE, 0, 0);

	providerPrintSummaryStats(&provider, stdout);
	providerPrintSummaryStats(&provider, summaryFile);
	fclose(summaryFile);

	providerCleanup(&provider);

	/* if we did a bind, clean it up */
	if (rsslSrvr)
	{
		RsslError error;
		FD_CLR(rsslSrvr->socketId, &readfds);
		FD_CLR(rsslSrvr->socketId, &exceptfds);
		rsslCloseServer(rsslSrvr, &error);
	}

	providerThreadConfigCleanup();

	rsslUninitialize();
	xmlCleanupParser();
	printf("Exiting.\n");
	exit(0);
}
Ejemplo n.º 2
0
void cleanUpAndExit()
{
	providerWaitForThreads(&provider);
	providerCollectStats(&provider, RSSL_FALSE, RSSL_FALSE, 0, 0);
	providerPrintSummaryStats(&provider, stdout);
	providerPrintSummaryStats(&provider, summaryFile);

	if (testFailed)
	{
		fprintf(stdout, "TEST FAILED. An error occurred during this test.\n");
		fprintf(summaryFile, "TEST FAILED. An error occurred during this test.\n");
	}

	fclose(summaryFile);

	providerCleanup(&provider);

	providerThreadConfigCleanup();

	rsslUninitialize();
	xmlCleanupParser();
	printf("Exiting.\n");
	exit(0);
}