From cbfe48a482e80dd513308d90d500f7c34c33b068 Mon Sep 17 00:00:00 2001 From: sje Date: Fri, 3 Nov 2006 13:33:30 +0000 Subject: git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@35 4f64403b-2f21-0410-a795-97e2b3489a10 --- iax/iaxclient_patch.patch | 597 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 597 insertions(+) create mode 100644 iax/iaxclient_patch.patch (limited to 'iax/iaxclient_patch.patch') diff --git a/iax/iaxclient_patch.patch b/iax/iaxclient_patch.patch new file mode 100644 index 0000000..f746225 --- /dev/null +++ b/iax/iaxclient_patch.patch @@ -0,0 +1,597 @@ +Index: lib/iaxclient_lib.c +=================================================================== +--- lib/iaxclient_lib.c (revision 666) ++++ lib/iaxclient_lib.c (working copy) +@@ -386,6 +386,7 @@ + vsnprintf(buf, 1024, fmt, args); + va_end(args); + ++ printf("jb_errf!\n"); + iaxc_usermsg(IAXC_ERROR, buf); + } + +Index: lib/libiax2/src/iax.c +=================================================================== +--- lib/libiax2/src/iax.c (revision 666) ++++ lib/libiax2/src/iax.c (working copy) +@@ -839,7 +839,7 @@ + { + /* Send the frame raw */ + #ifdef DEBUG_SUPPORT +- if (ntohs(h->scallno) & IAX_FLAG_FULL) ++ if (ntohs(f->callno) & IAX_FLAG_FULL) + iax_showframe(f, NULL, 0, f->transfer ? + &(f->session->transfer) : + &(f->session->peeraddr), f->datalen - sizeof(struct ast_iax2_full_hdr)); +@@ -1995,7 +1995,8 @@ + /* Setup host connection */ + hp = gethostbyname(hostname); + if (!hp) { +- snprintf(iax_errstr, sizeof(iax_errstr), "Invalid hostname: %s", hostname); ++ IAXERROR "Invalid hostname: %s", hostname); ++ DEBU(G "Invalid hostname: %s", hostname); + return -1; + } + memcpy(&session->peeraddr.sin_addr, hp->h_addr, sizeof(session->peeraddr.sin_addr)); +Index: lib/Makefile +=================================================================== +--- lib/Makefile (revision 666) ++++ lib/Makefile (working copy) +@@ -382,14 +382,14 @@ + ar rs $(MSLIB) $(OBJS) + + +-#shared: CFLAGS := $(CFLAGS) $(DYNCFLAGS) ++shared: CFLAGS := $(CFLAGS) $(DYNCFLAGS) + #shared: clean libiaxclient.a +-#shared: libiaxclient.a +-#ifeq ($(OSTYPE),MACOSX) +-# $(CC) -single_module -dylib -dynamiclib -o $(DYNLIB) $(OBJS) $(DYNLDFLAGS) -framework CoreAudio -framework AudioToolbox -framework System -framework Carbon -framework AudioUnit portaudio/lib/libportaudio.a +-#else +-# $(CC) -shared -o $(DYNLIB) $(OBJS) $(DYNLDFLAGS) +-#endif ++shared: libiaxclient.a ++ifeq ($(OSTYPE),MACOSX) ++ $(CC) -single_module -dylib -dynamiclib -o $(DYNLIB) $(OBJS) $(DYNLDFLAGS) -framework CoreAudio -framework AudioToolbox -framework System -framework Carbon -framework AudioUnit portaudio/lib/libportaudio.a ++else ++ $(CC) -shared -o $(DYNLIB) $(OBJS) $(DYNLDFLAGS) ++endif + + + +Index: lib/win/vs2005/iaxclient_dll.vcproj +=================================================================== +--- lib/win/vs2005/iaxclient_dll.vcproj (revision 666) ++++ lib/win/vs2005/iaxclient_dll.vcproj (working copy) +@@ -46,7 +46,7 @@ + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_WINDLL;_USRDLL;BUILDING_DLL;PA_NO_DS;PA_NO_ASIO;SPEEX_PREPROCESS=1;NEWJB;LIBIAX;SPEEX_EC=1;inline=__inline;strncasecmp=strnicmp;vsnprintf=_vsnprintf" + MinimalRebuild="true" + BasicRuntimeChecks="3" +- RuntimeLibrary="3" ++ RuntimeLibrary="1" + RuntimeTypeInfo="false" + PrecompiledHeaderFile="" + AssemblerListingLocation="$(IntDir)/" +@@ -143,7 +143,7 @@ + Optimization="4" + AdditionalIncludeDirectories="..\..,..\..\gsm\inc,..\..\portaudio\include,..\..\portaudio\src\common,..\..\portaudio\pablio,..\..\portmixer\px_common,..\..\libspeex\include,..\..\libiax2\src,..\..\wince" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_WINDLL;_USRDLL;BUILDING_DLL;PA_NO_DS;PA_NO_ASIO;SPEEX_PREPROCESS=1;NEWJB;LIBIAX;SPEEX_EC=1;inline=__inline;strncasecmp=strnicmp;vsnprintf=_vsnprintf" +- RuntimeLibrary="2" ++ RuntimeLibrary="0" + PrecompiledHeaderFile="" + AssemblerListingLocation="$(IntDir)/" + ObjectFile="$(IntDir)/" +@@ -237,6 +237,10 @@ + > + + ++ ++ + +@@ -302,6 +306,10 @@ + > + + ++ ++ + +@@ -594,7 +602,7 @@ + Filter="cpp;h" + > + + + + ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + +Index: lib/win/vs2005/iaxclient_lib.vcproj +=================================================================== +--- lib/win/vs2005/iaxclient_lib.vcproj (revision 666) ++++ lib/win/vs2005/iaxclient_lib.vcproj (working copy) +@@ -43,10 +43,10 @@ + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="..\..,..\..\gsm\inc,..\..\portaudio\include,..\..\portaudio\src\common,..\..\portaudio\pablio,..\..\portmixer\px_common,..\..\libspeex\include,..\..\libiax2\src,..\..\wince" +- PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_LIB;PA_NO_DS;PA_NO_ASIO;SPEEX_PREPROCESS=1;NEWJB;LIBIAX;SPEEX_EC=1;inline=__inline;strncasecmp=strnicmp;vsnprintf=_vsnprintf" ++ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_LIB;PA_NO_DS;PA_NO_ASIO;SPEEX_PREPROCESS=1;NEWJB;LIBIAX;SPEEX_EC=1;inline=__inline;strncasecmp=strnicmp;vsnprintf=_vsnprintf;DEBUG_SUPPORT" + MinimalRebuild="true" + BasicRuntimeChecks="3" +- RuntimeLibrary="3" ++ RuntimeLibrary="1" + RuntimeTypeInfo="false" + PrecompiledHeaderFile="" + AssemblerListingLocation="$(IntDir)/" +@@ -57,7 +57,6 @@ + SuppressStartupBanner="true" + Detect64BitPortabilityProblems="false" + DebugInformationFormat="3" +- CallingConvention="2" + CompileAs="1" + /> + + + + + + ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + +Index: lib/winfuncs.c +=================================================================== +--- lib/winfuncs.c (revision 666) ++++ lib/winfuncs.c (working copy) +@@ -85,7 +85,9 @@ + } + + int iaxc_prioboostend() { +- /* TODO */ ++ if ( !SetThreadPriority(GetCurrentThread(),THREAD_PRIORITY_NORMAL) ) { ++ fprintf(stderr, "SetThreadPriority failed: %ld.\n", GetLastError()); ++ } + return 0; + } + -- cgit v1.2.3