summaryrefslogtreecommitdiff
path: root/pjsip
diff options
context:
space:
mode:
Diffstat (limited to 'pjsip')
-rw-r--r--pjsip/include/pjsua-lib/pjsua_internal.h6
-rw-r--r--pjsip/src/pjsua-lib/pjsua_core.c6
2 files changed, 12 insertions, 0 deletions
diff --git a/pjsip/include/pjsua-lib/pjsua_internal.h b/pjsip/include/pjsua-lib/pjsua_internal.h
index 53a978f4..530dc89d 100644
--- a/pjsip/include/pjsua-lib/pjsua_internal.h
+++ b/pjsip/include/pjsua-lib/pjsua_internal.h
@@ -242,6 +242,12 @@ struct pjsua_data
extern struct pjsua_data pjsua_var;
+/**
+ * Get the instance of pjsua
+ */
+PJ_DECL(struct pjsua_data*) pjsua_get_var(void);
+
+
/**
* IM callback data.
diff --git a/pjsip/src/pjsua-lib/pjsua_core.c b/pjsip/src/pjsua-lib/pjsua_core.c
index 95ad7aa8..a60301ad 100644
--- a/pjsip/src/pjsua-lib/pjsua_core.c
+++ b/pjsip/src/pjsua-lib/pjsua_core.c
@@ -27,6 +27,12 @@
struct pjsua_data pjsua_var;
+PJ_DEF(struct pjsua_data*) pjsua_get_var(void)
+{
+ return &pjsua_var;
+}
+
+
/* Display error */
PJ_DEF(void) pjsua_perror( const char *sender, const char *title,
pj_status_t status)