aboutsummaryrefslogtreecommitdiffstats
path: root/addons/ooh323c/src/ooasn1.h
diff options
context:
space:
mode:
authormay <may@f38db490-d61c-443f-a65b-d21fe96a405b>2009-11-04 22:10:44 +0000
committermay <may@f38db490-d61c-443f-a65b-d21fe96a405b>2009-11-04 22:10:44 +0000
commit1303687410947c0e57fb1cb08881d7f86cb163f1 (patch)
treec8a21eb3b2896c7f5b558913cb7ea914b40a06ce /addons/ooh323c/src/ooasn1.h
parentb30cbb1a915f84ad6e5ed037fce9ecbbd39d608d (diff)
Reworked chan_ooh323 channel module.
Many architectural and functional changes. Main changes are threading model chanes (many thread in ooh323 stack instead of one), modifications and improvements in signalling part, additional codecs support (726, speex), t38 mode support. This module tested and used in production environment. (closes issue #15285) Reported by: may213 Tested by: sles, c0w, OrNix Review: https://reviewboard.asterisk.org/r/324/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@227898 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'addons/ooh323c/src/ooasn1.h')
-rw-r--r--addons/ooh323c/src/ooasn1.h20
1 files changed, 18 insertions, 2 deletions
diff --git a/addons/ooh323c/src/ooasn1.h b/addons/ooh323c/src/ooasn1.h
index 47219fac2..86a9b80c8 100644
--- a/addons/ooh323c/src/ooasn1.h
+++ b/addons/ooh323c/src/ooasn1.h
@@ -22,6 +22,9 @@
#ifndef _OOASN1_H_
#define _OOASN1_H_
+#include <asterisk.h>
+#include <asterisk/lock.h>
+
#include <limits.h>
#include <stdio.h>
#include <string.h>
@@ -406,6 +409,7 @@ typedef struct OOCTXT { /* context block */
struct EventHandler* pEventHandler; /* event handler object */
ASN1USINT flags; /* flag bits */
ASN1OCTET spare[2];
+ ast_mutex_t pLock;
} OOCTXT;
/* macros and function prototypes */
@@ -512,8 +516,8 @@ extern "C" {
#endif /* EXTERN */
#ifndef _NO_MALLOC
-#define ASN1CRTMALLOC0(nbytes) malloc(nbytes)
-#define ASN1CRTFREE0(ptr) free(ptr)
+/*#define ASN1CRTMALLOC0(nbytes) malloc(nbytes)
+#define ASN1CRTFREE0(ptr) free(ptr) */
#else
#ifdef _NO_THREADS
@@ -540,9 +544,15 @@ extern EXTERN OOCTXT g_ctxt;
#define DE_BIT(pctxt,pvalue) \
+((DE_INCRBITIDX (pctxt) != ASN_OK) ? ASN_E_ENDOFBUF : ( \
+((*(pvalue) = (((pctxt)->buffer.data[(pctxt)->buffer.byteIndex]) & \
+(1 << (pctxt)->buffer.bitOffset)) != 0), ASN_OK) ))
+/*
+#define DE_BIT(pctxt,pvalue) \
((DE_INCRBITIDX (pctxt) != ASN_OK) ? ASN_E_ENDOFBUF : ((pvalue) ? \
((*(pvalue) = (((pctxt)->buffer.data[(pctxt)->buffer.byteIndex]) & \
(1 << (pctxt)->buffer.bitOffset)) != 0), ASN_OK) : ASN_OK ))
+*/
#define encodeIA5String(pctxt,value,permCharSet) \
@@ -1004,9 +1014,15 @@ EXTERN void memSetStaticBuf (void* memHeapBuf, ASN1UINT blkSize);
((pctxt)->buffer.bitOffset = 7, ASN_OK)) : ASN_OK)
#define DECODEBIT(pctxt,pvalue) \
+((INCRBITIDX (pctxt) != ASN_OK) ? ASN_E_ENDOFBUF : ( \
+((*(pvalue) = (((pctxt)->buffer.data[(pctxt)->buffer.byteIndex]) & \
+(1 << (pctxt)->buffer.bitOffset)) != 0), ASN_OK) ))
+/*
+#define DECODEBIT(pctxt,pvalue) \
((INCRBITIDX (pctxt) != ASN_OK) ? ASN_E_ENDOFBUF : ((pvalue) ? \
((*(pvalue) = (((pctxt)->buffer.data[(pctxt)->buffer.byteIndex]) & \
(1 << (pctxt)->buffer.bitOffset)) != 0), ASN_OK) : ASN_OK ))
+*/
/*
#define SETCHARSET(csetvar, canset, abits, ubits) \