From: Olivier J. <oja...@us...> - 2006-02-02 14:24:38
|
Update of /cvsroot/sipp/sipp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31855 Modified Files: Tag: cumulus Makefile call.cpp call.hpp sipp.hpp Log Message: Fix compilation issue on Linux and warnings on HPUXi (relating to floor addition). Fix a bug where defense messages are sent without using TLS when TLS transport is in use - reported by Jason La Carruba. Index: call.cpp =================================================================== RCS file: /cvsroot/sipp/sipp/call.cpp,v retrieving revision 1.9.2.44 retrieving revision 1.9.2.45 diff -C2 -d -r1.9.2.44 -r1.9.2.45 *** call.cpp 24 Jan 2006 15:58:35 -0000 1.9.2.44 --- call.cpp 2 Feb 2006 14:24:26 -0000 1.9.2.45 *************** *** 452,456 **** void call::connect_socket_if_needed() { - #ifdef _USE_OPENSSL int err; --- 452,455 ---- *************** *** 562,566 **** if (L_status) { - sipp_customize_socket(call_socket); if(connect(call_socket, --- 561,564 ---- *************** *** 661,665 **** } ! if(lost(scenario[index] -> lost)) { TRACE_MSG((s, "%s message voluntary lost (while sending).", TRANSPORT_TO_STRING(transport))); --- 659,663 ---- } ! if((index!=-1) && (lost(scenario[index] -> lost))) { TRACE_MSG((s, "%s message voluntary lost (while sending).", TRANSPORT_TO_STRING(transport))); *************** *** 688,692 **** ERROR_NO("Unable to bind UDP socket for rsa option"); } - } else { if((call_remote_socket= socket(use_ipv6 ? AF_INET6 : AF_INET, --- 686,689 ---- *************** *** 749,786 **** } int call::sendBuffer(char * msg) { - void ** state; - int sock; int rc; ! TRACE_MSG((s, "-----------------------------------------------\n" ! "%s message send:\n\n%s\n", ! TRANSPORT_TO_STRING(transport), ! msg)); ! ! if(call_socket) { ! state = &comp_state; ! sock = call_socket; ! } else { ! state = &monosocket_comp_state; ! if(transport == T_UDP) { ! sock = main_socket; ! } else { ! sock = tcp_multiplex; ! } ! } ! ! rc = send_message(sock, state, msg); ! ! if(rc == -1) return -1; ! if(rc < -1) { ! CStat::instance()->computeStat(CStat::E_CALL_FAILED); ! CStat::instance()->computeStat(CStat::E_FAILED_CANNOT_SEND_MSG); ! delete_call(id); ! } ! ! return rc; /* OK */ } --- 746,759 ---- } + /* This method is used to send messages that are not */ + /* part of the XML scenario */ int call::sendBuffer(char * msg) { int rc; ! /* call send_raw but with a special scenario index */ ! rc=send_raw(msg, -1); ! return rc; } Index: Makefile =================================================================== RCS file: /cvsroot/sipp/sipp/Makefile,v retrieving revision 1.7.2.11 retrieving revision 1.7.2.12 diff -C2 -d -r1.7.2.11 -r1.7.2.12 *** Makefile 10 Jan 2006 16:18:49 -0000 1.7.2.11 --- Makefile 2 Feb 2006 14:24:26 -0000 1.7.2.12 *************** *** 125,129 **** #Link Libraries ! LIBS_linux= -ldl -lpthread -lncurses -lstdc++ -L /usr/local/lib -L /usr/lib -L /usr/lib64 LIBS_hpux= -lcurses -lpthread -L /opt/openssl/lib -L /usr/local/lib LIBS_tru64= -lcurses -lpthread --- 125,129 ---- #Link Libraries ! LIBS_linux= -ldl -lpthread -lncurses -lstdc++ -lm -L /usr/local/lib -L /usr/lib -L /usr/lib64 LIBS_hpux= -lcurses -lpthread -L /opt/openssl/lib -L /usr/local/lib LIBS_tru64= -lcurses -lpthread Index: sipp.hpp =================================================================== RCS file: /cvsroot/sipp/sipp/sipp.hpp,v retrieving revision 1.5.2.20 retrieving revision 1.5.2.21 diff -C2 -d -r1.5.2.20 -r1.5.2.21 *** sipp.hpp 24 Jan 2006 15:58:35 -0000 1.5.2.20 --- sipp.hpp 2 Feb 2006 14:24:26 -0000 1.5.2.21 *************** *** 44,47 **** --- 44,48 ---- #include <vector> #include <string> + #include <math.h> /* Sipp includes */ Index: call.hpp =================================================================== RCS file: /cvsroot/sipp/sipp/call.hpp,v retrieving revision 1.5.2.15 retrieving revision 1.5.2.16 diff -C2 -d -r1.5.2.15 -r1.5.2.16 *** call.hpp 24 Jan 2006 15:58:35 -0000 1.5.2.15 --- call.hpp 2 Feb 2006 14:24:26 -0000 1.5.2.16 *************** *** 18,21 **** --- 18,24 ---- */ + #ifndef __CALL__ + #define __CALL__ + #include <map> #include <sys/types.h> *************** *** 27,31 **** --- 30,36 ---- #endif + #ifndef MAX #define MAX(a, b) ((a) > (b) ? (a) : (b)) + #endif #define MAX_HEADER_LEN 2049 #define UDP_MAX_RETRANS_INVITE_TRANSACTION 5 *************** *** 238,239 **** --- 243,245 ---- void delete_call(char *); + #endif |