[asterisk-commits] jpeeler: branch jpeeler/bug11261 r182124 - /team/jpeeler/bug11261/channels/h323/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Mar 13 16:31:39 CDT 2009
Author: jpeeler
Date: Fri Mar 13 16:31:36 2009
New Revision: 182124
URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=182124
Log:
compile with either openh323 or h323plus
Modified:
team/jpeeler/bug11261/channels/h323/ast_h323.cxx
team/jpeeler/bug11261/channels/h323/ast_h323.h
Modified: team/jpeeler/bug11261/channels/h323/ast_h323.cxx
URL: http://svn.digium.com/svn-view/asterisk/team/jpeeler/bug11261/channels/h323/ast_h323.cxx?view=diff&rev=182124&r1=182123&r2=182124
==============================================================================
--- team/jpeeler/bug11261/channels/h323/ast_h323.cxx (original)
+++ team/jpeeler/bug11261/channels/h323/ast_h323.cxx Fri Mar 13 16:31:36 2009
@@ -30,6 +30,7 @@
*/
#include "asterisk.h"
+#define VERSION(a,b,c) ((a)*10000+(b)*100+(c))
#include <arpa/inet.h>
@@ -42,6 +43,10 @@
#include <h323pdu.h>
#include <h323neg.h>
#include <mediafmt.h>
+
+/* H323 Plus */
+#if VERSION(OPENH323_MAJOR, OPENH323_MINOR, OPENH323_BUILD) > VERSION(1,19,4)
+
#ifdef H323_H450
#include "h450/h4501.h"
#include "h450/h4504.h"
@@ -53,6 +58,18 @@
#include <h460/h4601.h>
#endif
+#else /* !H323 Plus */
+
+#include <lid.h>
+#ifdef H323_H450
+#include "h4501.h"
+#include "h4504.h"
+#include "h45011.h"
+#include "h450pdu.h"
+#endif
+
+#endif /* H323 Plus */
+
#include "compat_h323.h"
#ifdef __cplusplus
@@ -71,7 +88,7 @@
#include "cisco-h225.h"
#include "caps_h323.h"
-#if PWLIB_MAJOR * 10000 + PWLIB_MINOR * 100 + PWLIB_BUILD >= 1 * 10000 + 12 * 100 + 0
+#if VERSION(PWLIB_MAJOR, PWLIB_MINOR, PWLIB_BUILD) >= VERSION(1,12,0)
#define SKIP_PWLIB_PIPE_BUG_WORKAROUND 1
#endif
@@ -82,13 +99,20 @@
*/
/* PWlib Required Components */
+#if VERSION(OPENH323_MAJOR, OPENH323_MINOR, OPENH323_BUILD) > VERSION(1,19,4)
#define MAJOR_VERSION 1
#define MINOR_VERSION 19
#define BUILD_TYPE ReleaseCode
#define BUILD_NUMBER 6
+#else
+#define MAJOR_VERSION 1
+#define MINOR_VERSION 0
+#define BUILD_TYPE ReleaseCode
+#define BUILD_NUMBER 0
+#endif
-const char * h323manufact = "The NuFone Networks";
-const char * h323product = "H.323 Channel Driver for Asterisk";
+const char *h323manufact = "The NuFone Networks";
+const char *h323product = "H.323 Channel Driver for Asterisk";
PDECLARE_PROCESS(MyProcess,PProcess,h323manufact,h323product,MAJOR_VERSION,MINOR_VERSION,BUILD_TYPE,BUILD_NUMBER)
static MyProcess localProcess; // active for the life of the DLL
@@ -2347,7 +2371,7 @@
};
/* Addition of functions just to make the channel driver compile with H323Plus */
-
+#if VERSION(OPENH323_MAJOR, OPENH323_MINOR, OPENH323_BUILD) > VERSION(1,19,4)
/* Alternate RTP port information for Same NAT */
BOOL MyH323_ExternalRTPChannel::OnReceivedAltPDU(const H245_ArrayOf_GenericInformation & alternate )
{
@@ -2370,6 +2394,7 @@
{
return TRUE;
}
+#endif
int h323_set_alias(struct oh323_alias *alias)
Modified: team/jpeeler/bug11261/channels/h323/ast_h323.h
URL: http://svn.digium.com/svn-view/asterisk/team/jpeeler/bug11261/channels/h323/ast_h323.h?view=diff&rev=182124&r1=182123&r2=182124
==============================================================================
--- team/jpeeler/bug11261/channels/h323/ast_h323.h (original)
+++ team/jpeeler/bug11261/channels/h323/ast_h323.h Fri Mar 13 16:31:36 2009
@@ -152,16 +152,23 @@
PIPSocket::Address localIpAddr;
PIPSocket::Address remoteIpAddr;
/* Additional functions in order to have chan_h323 compile with H323Plus */
+#if VERSION(OPENH323_MAJOR, OPENH323_MINOR, OPENH323_BUILD) > VERSION(1,19,4)
BOOL OnReceivedAltPDU(const H245_ArrayOf_GenericInformation & alternate );
BOOL OnSendingAltPDU(H245_ArrayOf_GenericInformation & alternate) const;
void OnSendOpenAckAlt(H245_ArrayOf_GenericInformation & alternate) const;
BOOL OnReceivedAckAltPDU(const H245_ArrayOf_GenericInformation & alternate);
+#endif
WORD localPort;
WORD remotePort;
};
#ifdef H323_H450
+
+#if VERSION(OPENH323_MAJOR, OPENH323_MINOR, OPENH323_BUILD) > VERSION(1,19,4)
#include <h450/h450pdu.h>
+#else
+#include <h450pdu.h>
+#endif
class MyH4504Handler : public H4504Handler
{
More information about the asterisk-commits
mailing list