]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[Build-System] Remove mod_freetdm from spec file, fix compile errors on CentOS 797/head
authorMike Jerris <mike@signalwire.com>
Thu, 13 Aug 2020 16:45:58 +0000 (20:45 +0400)
committerAndrey Volk <andywolk@gmail.com>
Fri, 14 Aug 2020 14:49:39 +0000 (18:49 +0400)
freeswitch.spec
src/mod/applications/mod_avmd/mod_avmd.c
src/mod/event_handlers/mod_cdr_mongodb/driver/src/mongo.c
src/mod/event_handlers/mod_erlang_event/ei_helpers.c

index e8bb6d64cff8b7aa10a209b3e24897a6b997c53d..7bf9774602986621991ceaff0659686f6cb42e8b 100644 (file)
@@ -4,7 +4,7 @@
 #
 # includes module(s): freeswitch-devel freeswitch-codec-passthru-amr freeswitch-codec-passthru-amrwb freeswitch-codec-passthru-g729 
 #                     freeswitch-codec-passthru-g7231 freeswitch-lua freeswitch-mariadb freeswitch-pgsql freeswitch-perl freeswitch-python freeswitch-v8 freeswitch-signalwire
-#                     freeswitch-lan-de freeswitch-lang-en freeswitch-lang-fr freeswitch-lang-hu freeswitch-lang-ru freeswitch-freetdm
+#                     freeswitch-lan-de freeswitch-lang-en freeswitch-lang-fr freeswitch-lang-hu freeswitch-lang-ru
 #                    and others
 #
 # Initial Version Copyright (C) 2007 Peter Nixon and Michal Bielicki, All Rights Reserved.
@@ -959,52 +959,6 @@ Requires:       %{name} = %{version}-%{release}
 %description endpoint-rtc
 Verto protocol support for FreeSWITCH open source telephony platform.
 
-%package freetdm
-Summary:       Provides a unified interface to hardware TDM cards and ss7 stacks for FreeSWITCH
-Group:         System/Libraries
-Requires:        %{name} = %{version}-%{release}
-
-%description freetdm
-FreeTDM
-
-%if %{build_sng_isdn}
-
-%package freetdm-sng-isdn
-Summary:       Sangoma ISDN Module for FreeTDM
-Group:         System/Libraries
-Requires:       %{name} = %{version}-%{release}
-Requires:       %{name}-freetdm = %{version}-%{release}
-Requires: wanpipe 
-Requires: libsng_isdn 
-BuildRequires: wanpipe 
-BuildRequires: libsng_isdn 
-
-%description freetdm-sng-isdn
-Sangoma ISDN Module for freetdm
-
-%endif
-
-%if %{build_sng_ss7}
-
-%package freetdm-sng-ss7
-Summary:       Provides a unified interface to hardware TDM cards and ss7 stacks for FreeSWITCH, Sangoma SS7 Module
-Group:         System/Libraries
-Requires:        %{name} = %{version}-%{release}
-Requires:       %{name}-freetdm = %{version}-%{release}
-Requires: wanpipe 
-Requires: libsng_ss7 
-BuildRequires: wanpipe 
-BuildRequires: libsng_ss7 
-%if 0%{?fedora_version} >= 8 || 0%{?rhel} >= 6
-Requires: openssl098e
-BuildRequires: openssl098e
-%endif
-
-%description freetdm-sng-ss7
-Sangoma SMG-SS7 drivers for FreeTDM
-
-%endif
-
 ######################################################################################################################
 #                              FreeSWITCH Event Handler Modules
 ######################################################################################################################
@@ -1567,7 +1521,7 @@ DIRECTORIES_MODULES=""
 #                                              Endpoints
 #
 ######################################################################################################################
-ENDPOINTS_MODULES="endpoints/mod_dingaling ../../libs/freetdm/mod_freetdm \
+ENDPOINTS_MODULES="endpoints/mod_dingaling \
                        endpoints/mod_loopback endpoints/mod_portaudio endpoints/mod_rtmp \
                        endpoints/mod_skinny endpoints/mod_verto endpoints/mod_rtc endpoints/mod_sofia"
 
@@ -2351,32 +2305,6 @@ fi
 %files endpoint-rtc
 %{MODINSTDIR}/mod_rtc.so*
 
-######################################################################################################################
-#
-#                                              FreeTDM Module for TDM Interaction
-#
-######################################################################################################################
-%files freetdm
-%config(noreplace) %attr(0640, freeswitch, daemon) %{sysconfdir}/tones.conf
-%config(noreplace) %attr(0640, freeswitch, daemon) %{sysconfdir}/autoload_configs/freetdm.conf.xml
-%config(noreplace) %attr(0640, freeswitch, daemon) %{sysconfdir}/pika.conf
-%config(noreplace) %attr(0640, freeswitch, daemon) %{sysconfdir}/freetdm.conf
-%config(noreplace) %attr(0640, freeswitch, daemon) %{sysconfdir}/wanpipe.conf
-%config(noreplace) %attr(0640, freeswitch, daemon) %{sysconfdir}/zt.conf
-%{LIBDIR}/libfreetdm.so*
-%{MODINSTDIR}/mod_freetdm.so*
-%{MODINSTDIR}/ftmod_skel*.so*
-%{MODINSTDIR}/ftmod_[a-r,t-z]*.so*
-
-%if %{build_sng_ss7}
-%files freetdm-sng-ss7
-%{MODINSTDIR}/ftmod_sangoma_ss7.so*
-%endif
-
-%if %{build_sng_isdn}
-%files freetdm-sng-isdn
-%{MODINSTDIR}/ftmod_sangoma_isdn.so*
-%endif
 
 ######################################################################################################################
 #
index 4b95e1a5c1e7adbbaf0f25b7c4de8e8309860335..a7a59d928941351d3e070a09ca71857fcc730908 100644 (file)
@@ -1340,6 +1340,7 @@ static switch_status_t avmd_parse_cmd_data(avmd_session_t *s, const char *cmd_da
             /* iterate over params, check if they mean something to us, set */
             idx = 0;
             while (idx < argc) {
+                switch_assert(argv[idx]);
                 status = avmd_parse_cmd_data_one_entry(argv[idx], &settings);
                 if (status != SWITCH_STATUS_SUCCESS) {
                     switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(s->session), SWITCH_LOG_ERROR,
index 51da18d078bbb459170f67712e8b9b720bc1bf9d..77870b3dc22abb1fa455295b78705540367b0118 100644 (file)
@@ -406,7 +406,7 @@ MONGO_EXPORT int mongo_connect( mongo *conn , const char *host, int port ) {
     mongo_init( conn );
 
     conn->primary = bson_malloc( sizeof( mongo_host_port ) );
-    strncpy( conn->primary->host, host, strlen( host ) + 1 );
+    strncpy( conn->primary->host, host, sizeof(conn->primary->host) - 1 );
     conn->primary->port = port;
     conn->primary->next = NULL;
 
@@ -438,7 +438,7 @@ static void mongo_replset_add_node( mongo_host_port **list, const char *host, in
     mongo_host_port *host_port = bson_malloc( sizeof( mongo_host_port ) );
     host_port->port = port;
     host_port->next = NULL;
-    strncpy( host_port->host, host, strlen( host ) + 1 );
+    strncpy( host_port->host, host, sizeof(host_port->host) - 1 );
 
     if( *list == NULL )
         *list = host_port;
@@ -618,7 +618,7 @@ MONGO_EXPORT int mongo_replset_connect( mongo *conn ) {
 
                 /* Primary found, so return. */
                 else if( conn->replset->primary_connected ) {
-                    strncpy( conn->primary->host, node->host, strlen( node->host ) + 1 );
+                    snprintf( conn->primary->host, sizeof(conn->primary->host), "%s", node->host );
                     conn->primary->port = node->port;
                     return MONGO_OK;
                 }
@@ -1246,10 +1246,13 @@ MONGO_EXPORT int mongo_find_one( mongo *conn, const char *ns, const bson *query,
 }
 
 MONGO_EXPORT void mongo_cursor_init( mongo_cursor *cursor, mongo *conn, const char *ns ) {
+    size_t len = strlen(ns) + 1;
     memset( cursor, 0, sizeof( mongo_cursor ) );
     cursor->conn = conn;
-    cursor->ns = ( const char * )bson_malloc( strlen( ns ) + 1 );
-    strncpy( ( char * )cursor->ns, ns, strlen( ns ) + 1 );
+    cursor->ns = ( const char * )bson_malloc( len );
+    if (cursor->ns) {
+        strncpy((char *)cursor->ns, ns, len);
+    }
     cursor->current.data = NULL;
 }
 
index cf3a6aca31696a5b2a569b59c0a52c8ecb4b3149..6472180a2eda5ac1ac0ec51d1baa49243d1e2e75 100644 (file)
@@ -202,7 +202,7 @@ int ei_spawn(struct ei_cnode_s *ec, int sockfd, erlang_ref * ref, char *module,
 void ei_init_ref(ei_cnode * ec, erlang_ref * ref)
 {
        memset(ref, 0, sizeof(*ref));   /* zero out the struct */
-       snprintf(ref->node, MAXATOMLEN, "%s", ec->thisnodename);
+       snprintf(ref->node, MAXATOMLEN + 1, "%s", ec->thisnodename);
 
        switch_mutex_lock(mod_erlang_event_globals.ref_mutex);
        mod_erlang_event_globals.reference0++;