Kannel: Open Source WAP and SMS gateway  svn-r5262
gwlib.c File Reference
#include "gwlib.h"

Go to the source code of this file.


void() gwlib_assert_init (void)
void gwlib_init (void)
void gwlib_shutdown (void)
int gwlib_initialized (void)


static int init = 0

Function Documentation

◆ gwlib_assert_init()

◆ gwlib_init()

void gwlib_init ( void  )

Definition at line 78 of file gwlib.c.

References cfg_init(), charset_init(), gw_assert(), gwlib_protected_init(), gwthread_init(), http_init(), init, log_init(), octstr_init(), socket_init(), and uuid_init().

Referenced by main(), and remove_pid_file().

79 {
80  gw_assert(!init);
81  gw_init_mem();
82  uuid_init();
83  octstr_init();
85  gwthread_init();
86  log_init();
87  http_init();
88  socket_init();
89  charset_init();
90  cfg_init();
91  init = 1;
92 }
gw_assert(wtls_machine->packet_to_send !=NULL)
void log_init(void)
Definition: log.c:230
void uuid_init(void)
Definition: gw_uuid.c:86
void socket_init(void)
Definition: socket.c:663
void charset_init()
Definition: charset.c:200
void gwlib_protected_init(void)
Definition: protected.c:103
static int init
Definition: gwlib.c:69
void http_init(void)
Definition: http.c:3575
void cfg_init(void)
Definition: cfg.c:884
void gwthread_init(void)
void octstr_init(void)
Definition: octstr.c:216

◆ gwlib_initialized()

int gwlib_initialized ( void  )

Definition at line 111 of file gwlib.c.

References init.

Referenced by remove_pid_file().

112 {
113  return init;
114 }
static int init
Definition: gwlib.c:69

◆ gwlib_shutdown()

void gwlib_shutdown ( void  )

Definition at line 94 of file gwlib.c.

References cfg_shutdown(), charset_shutdown(), gwlib_assert_init(), gwlib_protected_shutdown(), gwthread_shutdown(), http_shutdown(), init, log_shutdown(), octstr_shutdown(), socket_shutdown(), and uuid_shutdown().

Referenced by main(), parachute_start(), and remove_pid_file().

95 {
98  http_shutdown();
101  octstr_shutdown();
103  uuid_shutdown();
104  cfg_shutdown();
105  gw_check_leaks();
106  log_shutdown();
107  gwmem_shutdown();
108  init = 0;
109 }
void gwlib_protected_shutdown(void)
Definition: protected.c:112
void charset_shutdown()
Definition: charset.c:210
void log_shutdown(void)
Definition: log.c:245
void octstr_shutdown(void)
Definition: octstr.c:224
void socket_shutdown(void)
Definition: socket.c:668
void cfg_shutdown(void)
Definition: cfg.c:895
void gwthread_shutdown(void)
static int init
Definition: gwlib.c:69
void uuid_shutdown(void)
Definition: gw_uuid.c:97
void() gwlib_assert_init(void)
Definition: gwlib.c:72
void http_shutdown(void)
Definition: http.c:3595

Variable Documentation

◆ init

int init = 0

Definition at line 69 of file gwlib.c.

Referenced by gwlib_assert_init(), gwlib_init(), gwlib_initialized(), gwlib_shutdown(), and ws_stmt_for().

See file LICENSE for details about the license agreement for using, modifying, copying or deriving work from this software.