From: <do...@us...> - 2007-12-06 06:10:20
|
Revision: 1303 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1303&view=rev Author: dohpaz Date: 2007-12-05 22:10:21 -0800 (Wed, 05 Dec 2007) Log Message: ----------- Merge up to trunk of r1302. Modified Paths: -------------- branches/team/elbunce/iaxclient/lib/libiax2/src/iax-client.h branches/team/elbunce/iaxclient/lib/libiax2/src/iax.c branches/team/elbunce/iaxclient/simpleclient/stresstest/stresstest.c Modified: branches/team/elbunce/iaxclient/lib/libiax2/src/iax-client.h =================================================================== --- branches/team/elbunce/iaxclient/lib/libiax2/src/iax-client.h 2007-12-06 06:05:28 UTC (rev 1302) +++ branches/team/elbunce/iaxclient/lib/libiax2/src/iax-client.h 2007-12-06 06:10:21 UTC (rev 1303) @@ -17,9 +17,6 @@ #if defined(_MSC_VER) /* disable zero-sized array in struct/union warning */ #pragma warning(disable:4200) -#endif - -#ifndef LINUX #define socklen_t int #endif Modified: branches/team/elbunce/iaxclient/lib/libiax2/src/iax.c =================================================================== --- branches/team/elbunce/iaxclient/lib/libiax2/src/iax.c 2007-12-06 06:05:28 UTC (rev 1302) +++ branches/team/elbunce/iaxclient/lib/libiax2/src/iax.c 2007-12-06 06:10:21 UTC (rev 1303) @@ -3113,7 +3113,7 @@ if (ntohs(fh->scallno) & IAX_FLAG_FULL) { /* Full size header */ - if (len < sizeof(struct ast_iax2_full_hdr)) { + if ((size_t)len < sizeof(struct ast_iax2_full_hdr)) { DEBU(G "Short header received from %s\n", inet_ntoa(sin->sin_addr)); IAXERROR "Short header received from %s\n", inet_ntoa(sin->sin_addr)); return NULL; @@ -3132,7 +3132,7 @@ DEBU(G "No session?\n"); return NULL; } else { - if (len < sizeof(struct ast_iax2_mini_hdr)) { + if ((size_t)len < sizeof(struct ast_iax2_mini_hdr)) { DEBU(G "Short header received from %s\n", inet_ntoa(sin->sin_addr)); IAXERROR "Short header received from %s\n", inet_ntoa(sin->sin_addr)); return NULL; Modified: branches/team/elbunce/iaxclient/simpleclient/stresstest/stresstest.c =================================================================== --- branches/team/elbunce/iaxclient/simpleclient/stresstest/stresstest.c 2007-12-06 06:05:28 UTC (rev 1302) +++ branches/team/elbunce/iaxclient/simpleclient/stresstest/stresstest.c 2007-12-06 06:10:21 UTC (rev 1303) @@ -1,18 +1,21 @@ /* -* vtestcall: make a single video test call with IAXCLIENT +* stresstest: simple program for applying IAX2 protocol stress to asterisk. * -* IAX Support for talking to Asterisk and other Gnophone clients +* Copyrights: +* Copyright (C) 2007, Wimba, Inc. * -* Copyright (C) 1999, Linux Support Services, Inc. -* -* Mark Spencer <mar...@li...> -* Stefano Falsetto <fal...@gn...> +* Contributors: * Mihai Balea <mihai AT hates DOT ms> +* Peter Grayson <jpg...@gm...> * * This program is free software, distributed under the terms of -* the GNU Lesser (Library) General Public License +* the GNU Lesser (Library) General Public License. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include <stdarg.h> #include <stdio.h> #include <stdlib.h> @@ -256,7 +259,6 @@ char *dest = NULL; char *ogg_file = NULL; int loop = 0; - int callNo; /* install signal handler to catch CRTL-Cs */ signal(SIGINT, signal_handler); @@ -319,8 +321,11 @@ default: usage(); } - } else + } + else + { dest = argv[i]; + } } if ( dest == NULL ) @@ -341,6 +346,7 @@ iaxc_video_format_set(formatp, format, framerate, bitrate, width, height, fragsize); iaxc_set_test_mode(1); + if (iaxc_initialize(MAX_CALLS)) fatal_error("cannot initialize iaxclient!"); @@ -351,14 +357,12 @@ iaxc_set_event_callback(test_mode_callback); // Crank the engine - iaxc_start_processing_thread(); + if ( iaxc_start_processing_thread() < 0 ) + fatal_error("failed iaxc_start_processing_thread()\n"); // Dial out - callNo = iaxc_call(dest); - if (callNo <= 0) - iaxc_select_call(callNo); - else - mylog("Failed to make call to '%s'", dest); + if ( iaxc_call(dest) < 0 ) + fatal_error("failed iaxc_call()"); // Wait for the call to be established; while ( !call_established && running ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |