]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
make ozmod_sangoma_boost compile on Windows ... but not linking yet -_-
authorMoises Silva <moy@sangoma.com>
Fri, 27 Nov 2009 22:40:45 +0000 (22:40 +0000)
committerMoises Silva <moy@sangoma.com>
Fri, 27 Nov 2009 22:40:45 +0000 (22:40 +0000)
git-svn-id: http://svn.openzap.org/svn/openzap/branches/sangoma_boost@915 a93c3328-9c30-0410-af19-c9cd2b2d52af

libs/freetdm/src/ozmod/ozmod_sangoma_boost/ozmod_sangoma_boost.2008.vcproj [new file with mode: 0644]
libs/freetdm/src/ozmod/ozmod_sangoma_boost/ozmod_sangoma_boost.c
libs/freetdm/src/ozmod/ozmod_sangoma_boost/sangoma_boost_client.c
libs/freetdm/src/ozmod/ozmod_sangoma_boost/sangoma_boost_client.h
libs/freetdm/src/ozmod/ozmod_sangoma_boost/sigboost.h

diff --git a/libs/freetdm/src/ozmod/ozmod_sangoma_boost/ozmod_sangoma_boost.2008.vcproj b/libs/freetdm/src/ozmod/ozmod_sangoma_boost/ozmod_sangoma_boost.2008.vcproj
new file mode 100644 (file)
index 0000000..3f7ef8d
--- /dev/null
@@ -0,0 +1,213 @@
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioProject\r
+       ProjectType="Visual C++"\r
+       Version="9.00"\r
+       Name="ozmod_sangoma_boost"\r
+       ProjectGUID="{D021EF2A-460D-4827-A0F7-41FDECF46F1B}"\r
+       RootNamespace="ozmod_sangoma_boost"\r
+       Keyword="Win32Proj"\r
+       TargetFrameworkVersion="196613"\r
+       >\r
+       <Platforms>\r
+               <Platform\r
+                       Name="Win32"\r
+               />\r
+       </Platforms>\r
+       <ToolFiles>\r
+       </ToolFiles>\r
+       <Configurations>\r
+               <Configuration\r
+                       Name="Debug|Win32"\r
+                       OutputDirectory="$(SolutionDir)$(ConfigurationName)"\r
+                       IntermediateDirectory="$(ConfigurationName)"\r
+                       ConfigurationType="2"\r
+                       CharacterSet="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="0"\r
+                               AdditionalIncludeDirectories="..\..\include;..\..\isdn\include"\r
+                               PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;OZMOD_SANGOMA_BOOST_EXPORTS"\r
+                               MinimalRebuild="true"\r
+                               BasicRuntimeChecks="3"\r
+                               RuntimeLibrary="3"\r
+                               UsePrecompiledHeader="0"\r
+                               WarningLevel="4"\r
+                               WarnAsError="true"\r
+                               DebugInformationFormat="4"\r
+                               DisableSpecificWarnings="4100"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               LinkIncremental="2"\r
+                               GenerateDebugInformation="true"\r
+                               SubSystem="2"\r
+                               TargetMachine="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|Win32"\r
+                       OutputDirectory="$(SolutionDir)$(ConfigurationName)"\r
+                       IntermediateDirectory="$(ConfigurationName)"\r
+                       ConfigurationType="2"\r
+                       CharacterSet="1"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="2"\r
+                               EnableIntrinsicFunctions="true"\r
+                               AdditionalIncludeDirectories="..\..\include"\r
+                               PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;OZMOD_SANGOMA_BOOST_EXPORTS"\r
+                               RuntimeLibrary="2"\r
+                               EnableFunctionLevelLinking="true"\r
+                               UsePrecompiledHeader="0"\r
+                               WarningLevel="4"\r
+                               WarnAsError="true"\r
+                               DebugInformationFormat="3"\r
+                               DisableSpecificWarnings="4100"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               LinkIncremental="1"\r
+                               GenerateDebugInformation="true"\r
+                               SubSystem="2"\r
+                               OptimizeReferences="2"\r
+                               EnableCOMDATFolding="2"\r
+                               TargetMachine="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+       </Configurations>\r
+       <References>\r
+       </References>\r
+       <Files>\r
+               <Filter\r
+                       Name="Source Files"\r
+                       Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
+                       UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"\r
+                       >\r
+                       <File\r
+                               RelativePath="ozmod_sangoma_boost.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="sangoma_boost_client.c"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+               <Filter\r
+                       Name="Header Files"\r
+                       Filter="h;hpp;hxx;hm;inl;inc;xsd"\r
+                       UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"\r
+                       >\r
+                       <File\r
+                               RelativePath="sangoma_boost_client.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="sangoma_boost_interface.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="sigboost.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="zap_sangoma_boost.h"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+       </Files>\r
+       <Globals>\r
+       </Globals>\r
+</VisualStudioProject>\r
index 59b47c91002bebba38ae011026a49898d0aef84d..60cda5467537b201f0a44227f80c45ad49d9a94d 100644 (file)
  *
  */
 
+/* NOTE:
+On WIN32 platform this code works with sigmod ONLY, don't try to make sense of any socket code for win32
+I basically ifdef out everything that the compiler complained about
+*/
+
 #include "openzap.h"
 #include "sangoma_boost_client.h"
 #include "zap_sangoma_boost.h"
@@ -194,11 +199,11 @@ static sangoma_boost_request_id_t __next_request_id(const char *func, int line)
  */
 static zap_channel_t *find_zchan(zap_span_t *span, sangomabc_short_event_t *event, int force)
 {
-       int i;
+       uint32_t i;
        zap_channel_t *zchan = NULL;
        zap_sangoma_boost_data_t *sangoma_boost_data = span->signal_data;
-       int targetspan = event->span+1;
-       int targetchan = event->chan+1;
+       uint32_t targetspan = event->span+1;
+       uint32_t targetchan = event->chan+1;
        if (sangoma_boost_data->sigmod) {
                /* span is not strictly needed here since we're supposed to get only events for our span */
                targetspan = event->span;
@@ -358,13 +363,13 @@ static ZIO_CHANNEL_REQUEST_FUNCTION(sangoma_boost_channel_request)
        zap_set_string(event.calling_name, caller_data->cid_name);
        zap_set_string(event.isup_in_rdnis, caller_data->rdnis.digits);
     if (strlen(caller_data->rdnis.digits)) {
-        event.isup_in_rdnis_size = strlen(caller_data->rdnis.digits)+1;
+        event.isup_in_rdnis_size = (uint16_t)strlen(caller_data->rdnis.digits)+1;
     }
     
        event.calling_number_screening_ind = caller_data->screen;
        event.calling_number_presentation = caller_data->pres;
        if (sangoma_boost_data->sigmod) {
-               event.span = span->channels[1]->physical_span_id;
+               event.span = (uint8_t)span->channels[1]->physical_span_id;
        }
 
        OUTBOUND_REQUESTS[r].status = BST_WAITING;
@@ -1315,9 +1320,11 @@ static zap_status_t zap_boost_connection_open(zap_span_t *span)
  */
 static int zap_boost_wait_event(zap_span_t *span, int ms)
 {
+#ifndef WIN32
                struct timeval tv = { 0, ms * 1000 };
-               int max, activity;
                sangomabc_connection_t *mcon, *pcon;
+               int max, activity;
+#endif
                zap_sangoma_boost_data_t *sangoma_boost_data = span->signal_data;
 
                if (sangoma_boost_data->sigmod) {
@@ -1331,6 +1338,7 @@ static int zap_boost_wait_event(zap_span_t *span, int ms)
                        }
                        return 1;
                }
+#ifndef WIN32
                mcon = &sangoma_boost_data->mcon;
                pcon = &sangoma_boost_data->pcon;
 
@@ -1352,6 +1360,8 @@ static int zap_boost_wait_event(zap_span_t *span, int ms)
                }
 
                return 1;
+#endif
+               return 0;
 }
 
 
index d50505c310485ef148ea65bec64318c805285580..5d9eea5f36bef42b481961db4710cb84fb28696f 100644 (file)
@@ -109,6 +109,7 @@ static void sangomabc_print_event_short(sangomabc_connection_t *mcon, sangomabc_
 
 static int create_conn_socket(sangomabc_connection_t *mcon, char *local_ip, int local_port, char *ip, int port)
 {
+#ifndef WIN32
        int rc;
        struct hostent *result, *local_result;
        char buf[512], local_buf[512];
@@ -174,12 +175,15 @@ static int create_conn_socket(sangomabc_connection_t *mcon, char *local_ip, int
                }
        }
 
-
        return mcon->socket;
+#else
+       return 0;
+#endif // ifndef WIN32
 }
 
 int sangomabc_connection_close(sangomabc_connection_t *mcon)
 {
+#ifndef WIN32
        if (mcon->sigmod) {
                zap_log(ZAP_LOG_WARNING, "I should not be called on a sigmod-managed connection!\n");
                return 0;
@@ -195,7 +199,7 @@ int sangomabc_connection_close(sangomabc_connection_t *mcon)
        }
        memset(mcon, 0, sizeof(*mcon));
        mcon->socket = -1;
-
+#endif
        return 0;
 }
 
@@ -206,8 +210,12 @@ int sangomabc_connection_open(sangomabc_connection_t *mcon, char *local_ip, int
                /*value of mcon->socket will be ignored in sigmod mode */
                return 0;
        }
+#ifndef WIN32
        create_conn_socket(mcon, local_ip, local_port, ip, port);
        return mcon->socket;
+#else
+       return 0;
+#endif
 }
 
 
@@ -217,7 +225,7 @@ int sangomabc_exec_command(sangomabc_connection_t *mcon, int span, int chan, int
     int retry = 5;
 
     sangomabc_event_init(&oevent, cmd, chan, span);
-    oevent.release_cause = cause;
+    oevent.release_cause = (uint8_t)cause;
 
        if (cmd == SIGBOOST_EVENT_SYSTEM_RESTART || cmd == SIGBOOST_EVENT_SYSTEM_RESTART_ACK) {
                mcon->rxseq_reset = 1;
@@ -227,7 +235,7 @@ int sangomabc_exec_command(sangomabc_connection_t *mcon, int span, int chan, int
        }
 
     if (id >= 0) {
-        oevent.call_setup_id = id;
+        oevent.call_setup_id = (uint16_t)id;
     }
 
     while (sangomabc_connection_write(mcon, (sangomabc_event_t*)&oevent) <= 0) {
@@ -250,10 +258,10 @@ int sangomabc_exec_commandp(sangomabc_connection_t *pcon, int span, int chan, in
     int retry = 5;
 
     sangomabc_event_init(&oevent, cmd, chan, span);
-    oevent.release_cause = cause;
+    oevent.release_cause = (uint8_t)cause;
 
     if (id >= 0) {
-        oevent.call_setup_id = id;
+        oevent.call_setup_id = (uint16_t)id;
     }
 
     while (sangomabc_connection_writep(pcon, (sangomabc_event_t*)&oevent) <= 0) {
@@ -271,7 +279,9 @@ int sangomabc_exec_commandp(sangomabc_connection_t *pcon, int span, int chan, in
 
 sangomabc_event_t *__sangomabc_connection_read(sangomabc_connection_t *mcon, int iteration, const char *file, const char *func, int line)
 {
+#ifndef WIN32
        unsigned int fromlen = sizeof(struct sockaddr_in);
+#endif
        int bytes = 0;
        int msg_ok = 0;
        sangomabc_queue_element_t *e = NULL;
@@ -283,11 +293,13 @@ sangomabc_event_t *__sangomabc_connection_read(sangomabc_connection_t *mcon, int
                        memcpy(&mcon->event, e->boostmsg, bytes);
                        zap_safe_free(e);
                }
-       } else {
+       } 
+#ifndef WIN32  
+       else {
                bytes = recvfrom(mcon->socket, &mcon->event, sizeof(mcon->event), MSG_DONTWAIT, 
                                                 (struct sockaddr *) &mcon->local_addr, &fromlen);
        }
-
+#endif
        if (bytes <= 0) {
                return NULL;
        }
@@ -365,16 +377,20 @@ sangomabc_event_t *__sangomabc_connection_read(sangomabc_connection_t *mcon, int
 
 sangomabc_event_t *__sangomabc_connection_readp(sangomabc_connection_t *mcon, int iteration, const char *file, const char *func, int line)
 {
+#ifndef WIN32
        unsigned int fromlen = sizeof(struct sockaddr_in);
+#endif
        int bytes = 0;
 
        if (mcon->sigmod) {
                /* priority stuff is handled just the same when there is a sigmod */
                return sangomabc_connection_read(mcon, iteration);
-       } else {
+       } 
+#ifndef WIN32
+       else {
                bytes = recvfrom(mcon->socket, &mcon->event, sizeof(mcon->event), MSG_DONTWAIT, (struct sockaddr *) &mcon->local_addr, &fromlen);
        }
-       
+#endif 
        if (bytes <= 0) {
                return NULL;
        }
@@ -405,14 +421,12 @@ sangomabc_event_t *__sangomabc_connection_readp(sangomabc_connection_t *mcon, in
 
 int __sangomabc_connection_write(sangomabc_connection_t *mcon, sangomabc_event_t *event, const char *file, const char *func, int line)
 {
-       int err;
+       int err = 0;
        int event_size=MIN_SIZE_CALLSTART_MSG+event->isup_in_rdnis_size;
-       if (!event || mcon->socket < 0 || !mcon->mutex) {
-               zap_log(file, func, line, ZAP_LOG_LEVEL_CRIT, "Critical Error: No Event Device\n");
-               return -EINVAL;
-               abort();
-       }
+
+       zap_assert_return(event != NULL, -1, "No event!");
+       zap_assert_return(mcon->socket >= 0, -1, "No mcon->socket!");
+       zap_assert_return(mcon->mutex != NULL, -1, "No mcon->mutex!");
 
        if (event->span >= ZAP_MAX_PHYSICAL_SPANS_PER_LOGICAL_SPAN || event->chan >= ZAP_MAX_CHANNELS_PHYSICAL_SPAN ) {
                zap_log(file, func, line, ZAP_LOG_LEVEL_CRIT, "Critical Error: TX Cmd=%s Invalid Span=%i Chan=%i\n", sangomabc_event_id_name(event->event_id), event->span, event->chan);
@@ -448,16 +462,16 @@ int __sangomabc_connection_write(sangomabc_connection_t *mcon, sangomabc_event_t
        if (mcon->sigmod) {
                mcon->sigmod->write_msg(mcon->span, event, event_size);
                err = event_size;
-       } else {
+       } 
+#ifndef WIN32
+       else {
                err = sendto(mcon->socket, event, event_size, 0, (struct sockaddr *) &mcon->remote_addr, sizeof(mcon->remote_addr));
        }
+#endif
 
        zap_mutex_unlock(mcon->mutex);
 
-       if (err != event_size) {
-               err = -1;
-               abort();
-       }
+       zap_assert_return(err == event_size, -1, "Failed to send the boost message completely!");
 
        if (boost_full_event(event->event_id)) {
                sangomabc_print_event_call(mcon, event, 0, 1, file, func, line);
@@ -471,15 +485,13 @@ int __sangomabc_connection_write(sangomabc_connection_t *mcon, sangomabc_event_t
 
 int __sangomabc_connection_writep(sangomabc_connection_t *mcon, sangomabc_event_t *event, const char *file, const char *func, int line)
 {
-       int err;
+       int err = 0;
        int event_size=sizeof(sangomabc_event_t);
 
        if (!mcon->sigmod) {
-               if (!event || mcon->socket < 0 || !mcon->mutex) {
-                       zap_log(file, func, line, ZAP_LOG_LEVEL_CRIT, "Critical Error: No Event Device\n");
-                       return -EINVAL;
-                       abort();
-               }
+               zap_assert_return(event != NULL, -1, "No event!");
+               zap_assert_return(mcon->socket >= 0, -1, "No mcon->socket!");
+               zap_assert_return(mcon->mutex != NULL, -1, "No mcon->mutex!");
        }
     
        if (!boost_full_event(event->event_id)) {
@@ -492,15 +504,15 @@ int __sangomabc_connection_writep(sangomabc_connection_t *mcon, sangomabc_event_
                mcon->sigmod->write_msg(mcon->span, event, event_size);
            err = event_size;
 
-       } else {
+       } 
+#ifndef WIN32
+       else {
                err = sendto(mcon->socket, event, event_size, 0, (struct sockaddr *) &mcon->remote_addr, sizeof(mcon->remote_addr));
        }
+#endif
        zap_mutex_unlock(mcon->mutex);
 
-       if (err != event_size) {
-               err = -1;
-               abort();
-       }
+       zap_assert_return(err == event_size, -1, "Failed to send boost message completely!");
 
        if (boost_full_event(event->event_id)) {
                sangomabc_print_event_call(mcon, event, 1, 1, file, func, line);
@@ -519,15 +531,15 @@ void sangomabc_call_init(sangomabc_event_t *event, const char *calling, const ch
 
        if (calling) {
                strncpy((char*)event->calling_number_digits, calling, sizeof(event->calling_number_digits)-1);
-               event->calling_number_digits_count = strlen(calling);
+               event->calling_number_digits_count = (uint8_t)strlen(calling);
        }
 
        if (called) {
                strncpy((char*)event->called_number_digits, called, sizeof(event->called_number_digits)-1);
-               event->called_number_digits_count = strlen(called);
+               event->called_number_digits_count = (uint8_t)strlen(called);
        }
                
-       event->call_setup_id = setup_id;
+       event->call_setup_id = (uint16_t)setup_id;
        
 }
 
@@ -535,8 +547,8 @@ void sangomabc_event_init(sangomabc_short_event_t *event, sangomabc_event_id_t e
 {
        memset(event, 0, sizeof(sangomabc_short_event_t));
        event->event_id = event_id;
-       event->chan = chan;
-       event->span = span;
+       event->chan = (uint8_t)chan;
+       event->span = (uint8_t)span;
 }
 
 const char *sangomabc_event_id_name(uint32_t event_id)
index 01eeb0803bfc8987b43a1aa36cab16a4e1351ac3..24a0a5c600743e4324b4e576f586406a7294997e 100644 (file)
 
 #include <ctype.h>
 #include <string.h>
+#ifndef WIN32
 #include <unistd.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <sys/types.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
 #ifdef HAVE_NETINET_SCTP_H
 #include <netinet/sctp.h>
 #endif
 #include <arpa/inet.h>
-#include <stdarg.h>
 #include <netdb.h>
-#include <sigboost.h>
 #include <sys/time.h>
+#endif
+#include <stdlib.h>
+#include <errno.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <stdarg.h>
+#include "sigboost.h"
 
-#define sangomabc_test_flag(p,flag)            ({              \
-                       ((p)->flags & (flag));                          \
-               })
+#define sangomabc_test_flag(p,flag) ((p)->flags & (flag))
 
 #define sangomabc_set_flag(p,flag)             do {            \
                ((p)->flags |= (flag));                                 \
@@ -120,7 +120,7 @@ typedef struct sangomabc_queue_element {
 } sangomabc_queue_element_t;
 
 /* disable nagle's algorythm */
-static inline void sctp_no_nagle(int socket)
+static __inline__ void sctp_no_nagle(int socket)
 {
 #ifdef HAVE_NETINET_SCTP_H
     int flag = 1;
@@ -134,10 +134,10 @@ sangomabc_event_t *__sangomabc_connection_read(sangomabc_connection_t *mcon, int
 sangomabc_event_t *__sangomabc_connection_readp(sangomabc_connection_t *mcon, int iteration, const char *file, const char *func, int line);
 int __sangomabc_connection_write(sangomabc_connection_t *mcon, sangomabc_event_t *event, const char *file, const char *func, int line);
 int __sangomabc_connection_writep(sangomabc_connection_t *mcon, sangomabc_event_t *event, const char *file, const char *func, int line);
-#define sangomabc_connection_write(_m,_e) __sangomabc_connection_write(_m, _e, __FILE__, __func__, __LINE__)
-#define sangomabc_connection_writep(_m,_e) __sangomabc_connection_writep(_m, _e, __FILE__, __func__, __LINE__)
-#define sangomabc_connection_read(_m,_e) __sangomabc_connection_read(_m, _e, __FILE__, __func__, __LINE__)
-#define sangomabc_connection_readp(_m,_e) __sangomabc_connection_readp(_m, _e, __FILE__, __func__, __LINE__)
+#define sangomabc_connection_write(_m,_e) __sangomabc_connection_write(_m, _e, __FILE__, __FUNCTION__, __LINE__)
+#define sangomabc_connection_writep(_m,_e) __sangomabc_connection_writep(_m, _e, __FILE__, __FUNCTION__, __LINE__)
+#define sangomabc_connection_read(_m,_e) __sangomabc_connection_read(_m, _e, __FILE__, __FUNCTION__, __LINE__)
+#define sangomabc_connection_readp(_m,_e) __sangomabc_connection_readp(_m, _e, __FILE__, __FUNCTION__, __LINE__)
 void sangomabc_event_init(sangomabc_short_event_t *event, sangomabc_event_id_t event_id, int chan, int span);
 void sangomabc_call_init(sangomabc_event_t *event, const char *calling, const char *called, int setup_id);
 const char *sangomabc_event_id_name(uint32_t event_id);
index 02a580777e3813a40bfb00e350854fd7d2d80980..47849c2c723292236c27ecae294492a62cc07714 100644 (file)
@@ -142,7 +142,7 @@ typedef struct
 #pragma pack()
 
 
-static inline int boost_full_event(int event_id)
+static __inline__ int boost_full_event(int event_id)
 {
         switch (event_id) {
         case SIGBOOST_EVENT_CALL_START:
@@ -150,10 +150,9 @@ static inline int boost_full_event(int event_id)
                case SIGBOOST_EVENT_CALL_PROGRESS:
                 return 1;
         default:
-                return 0;
+                       break;
         }
-
-        return 0;
+               return 0;
 }
 
 #endif