ssa_log.c: Set flog pointer to NULL after fclose in ssa_close_log

Signed-off-by: Sasha Kotchubievsky <sashakot@mellanox.com>
Signed-off-by: Hal Rosenstock <hal@mellanox.com>
ssa_log.c: Avoid closing stderr or stdout in ssa_close_log

SSA may use stderr or stdout for log. If an application
uses stderr or stdout after, this will likely crash the application
in unexpected way.

Signed-off-by: Sasha Kotchubievsky <sashakot@mellanox.com>
Signed-off-by: Hal Rosenstock <hal@mellanox.com>
[core distrib acm]: Move ssa log closing after cleanup

Signed-off-by: Sasha Kotchubievsky <sashakot@mellanox.com>
Signed-off-by: Hal Rosenstock <hal@mellanox.com>
Revert "plugin/configure.ac: Removed no longer needed glib check"

This reverts commit 5bcf3b8ef987fa78aad295abd4ae32fdfbe681a2

glib is now needed (again).

Signed-off-by: Sasha Kotchubievsky <sashakot@mellanox.com>
Signed-off-by: Hal Rosenstock <hal@mellanox.com>
[acm distrib]/configure.in: Add Glib checking to ibacm and ibssa applications

Signed-off-by: Sasha Kotchubievsky <sashakot@mellanox.com>
Signed-off-by: Hal Rosenstock <hal@mellanox.com>
[plugin distrib acm]/configure: Add check for g_thread_init function

AC_CHECK_LIB adds to dependencies necessary for g_thread_init.
The function's dependency is different from other Glib
threading routines.

Signed-off-by: Sasha Kotchubievsky <sashakot@mellanox.com>
Signed-off-by: Hal Rosenstock <hal@mellanox.com>
[plugin distrib acm]/Makefile.am: Add Glib support to Makefiles

Signed-off-by: Sasha Kotchubievsky <sashakot@mellanox.com>
Signed-off-by: Hal Rosenstock <hal@mellanox.com>
ssa.c: Add functions for AL thread pool

 1. ssa_access_thread_pool_init
 2. ssa_access_thread_pool_destroy
 3. g_al_callback - Thread callback.

ssa.c: Increase number of AL workers in the thread pool

ssa.c: Remove prdb_calc_num counter.

 g_thread_pool_unprocessed returns number of unprocessed
 task. Don't need special counter.

ssa.c: Remove sa_access_thread_pool.

 Glib thread pool is moved to access_context.

ssa.c: Rename ssa_al_task to ssa_access_task and move it to common.h

ssa.c: Change the version sience g_thread_init is depricated from 2.24 to 2.32