summaryrefslogtreecommitdiff
path: root/pjlib/include/pj/types.h
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2006-11-21 12:39:31 +0000
committerBenny Prijono <bennylp@teluu.com>2006-11-21 12:39:31 +0000
commit271cf23083b38b3f0d12a36bb1f28e458ee43861 (patch)
treed3c5bc170635051fd0aaa3fa41ba26fc421693f1 /pjlib/include/pj/types.h
parentc0cd0b4450fdcf785bb9184b4d6231d452cb8df5 (diff)
Fixed handles leak upon program exit, by introducing pj_shutdown() and pj_atexit(). Also fixed handle leaks in SIP transaction layer and SIP endpoint.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@815 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjlib/include/pj/types.h')
-rw-r--r--pjlib/include/pj/types.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/pjlib/include/pj/types.h b/pjlib/include/pj/types.h
index d15bd60f..df3b92e4 100644
--- a/pjlib/include/pj/types.h
+++ b/pjlib/include/pj/types.h
@@ -291,9 +291,29 @@ typedef int pj_exception_id_t;
* function is to initialize static library data, such as character table used
* in random string generation, and to initialize operating system dependent
* functionality (such as WSAStartup() in Windows).
+ *
+ * @return PJ_SUCCESS on success.
*/
PJ_DECL(pj_status_t) pj_init(void);
+
+/**
+ * Shutdown PJLIB.
+ */
+PJ_DECL(void) pj_shutdown(void);
+
+/**
+ * Register cleanup function to be called by PJLIB when pj_shutdown() is
+ * called.
+ *
+ * @param func The function to be registered.
+ *
+ * @return PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pj_atexit(void (*func)(void));
+
+
+
/**
* Swap the byte order of an 16bit data.
*