#
# 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.
%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
######################################################################################################################
# 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"
%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
######################################################################################################################
#
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;
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;
/* 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;
}
}
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;
}