diff --git a/sflphone-common/configure.ac b/sflphone-common/configure.ac index d6e761074ff1c040d99fac0ab80fbe0a33735c80..cfb4df434f18eeb1becb3c2e36c1de2d8bcd387a 100644 --- a/sflphone-common/configure.ac +++ b/sflphone-common/configure.ac @@ -329,7 +329,7 @@ AS_IF([test "x$with_gsm" != xno], ] ) -AC_DEFINE([HAVE_GSM], test "x$with_gsm" = "xyes", [Define if you have libgsm]) +AC_DEFINE_UNQUOTED([HAVE_GSM], `if test "x$with_gsm" = "xyes"; then echo 1; else echo 0; fi`, [Define if you have libgsm]) AM_CONDITIONAL(BUILD_GSM, test "x$with_gsm" = "xyes" ) dnl Check for libspeex @@ -385,7 +385,7 @@ AC_ARG_WITH([iax2], [], [with_iax2=yes]) -AC_DEFINE([HAVE_IAX], test "x$with_iax2" = "xyes", [Define if you have libiax2]) +AC_DEFINE_UNQUOTED([HAVE_IAX], `if test "x$with_iax2" = "xyes"; then echo 1; else echo 0;fi`, [Define if you have libiax2]) AM_CONDITIONAL(USE_IAX, test "x$with_iax2" = "xyes" ) dnl Check for network-manager diff --git a/sflphone-common/src/accountcreator.cpp b/sflphone-common/src/accountcreator.cpp index 82f56b1300e7a6e64e7b2aa1f9c5f480d8a78018..df7aa91a0261aeddc4e70cae6f96bfa68c78ed88 100644 --- a/sflphone-common/src/accountcreator.cpp +++ b/sflphone-common/src/accountcreator.cpp @@ -31,7 +31,7 @@ #include "accountcreator.h" #include "sip/sipaccount.h" -#ifdef USE_IAX +#if HAVE_IAX #include "iax/iaxaccount.h" #endif @@ -59,7 +59,7 @@ AccountCreator::createAccount (AccountType type, std::string accountID) return new SIPAccount (IP2IP_PROFILE); break; } -#ifdef USE_IAX +#if HAVE_IAX case IAX_ACCOUNT: { _debug ("AccountCreator: create account %s", accountID.c_str()); diff --git a/sflphone-common/src/global.h b/sflphone-common/src/global.h index c093de1722871dc76eaa5666ed7ee2ef5d578c33..d244ece14fff906ff1b7111b5f1de6b4a459c871 100644 --- a/sflphone-common/src/global.h +++ b/sflphone-common/src/global.h @@ -103,12 +103,6 @@ static const SOUND_FORMAT INT32 = 0x8; #define SFL_PCM_CAPTURE 0x0023 /** To open capture device only */ #define SFL_PCM_RINGTONE 0x0024 -#ifdef USE_IAX -#define IAX2_ENABLED true /** IAX2 support */ -#else -#define IAX2_ENABLED false /** IAX2 support */ -#endif - #define GSM_STRING_DESCRIPTION "gsm" /** GSM codec string description */ #define SPEEX_STRING_DESCRIPTION "speex" /** SPEEX codec string description */ #define ILBC_STRING_DESCRIPTION "ilbc" /** Ilbc codec string description */ diff --git a/sflphone-common/src/iax/iaxaccount.cpp b/sflphone-common/src/iax/iaxaccount.cpp index 80aa41cc839e00848d2309285ce026099c36e510..d3667c7e604228201b868815633ee620558088b6 100644 --- a/sflphone-common/src/iax/iaxaccount.cpp +++ b/sflphone-common/src/iax/iaxaccount.cpp @@ -201,7 +201,7 @@ void IAXAccount::loadConfig() { // If IAX is not supported, do not register this account -#ifndef USE_IAX +#if !HAVE_IAX _enabled = false; #endif } diff --git a/sflphone-common/src/managerimpl.cpp b/sflphone-common/src/managerimpl.cpp index aca91425b1683e12259077b6dacd9fd10bfe2201..abdb61db6bcbbdc6bc5911d3818524cd34f082f9 100644 --- a/sflphone-common/src/managerimpl.cpp +++ b/sflphone-common/src/managerimpl.cpp @@ -33,6 +33,8 @@ * as that of the covered work. */ +#include "config.h" + #include "managerimpl.h" #include "account.h" @@ -2864,11 +2866,7 @@ std::vector<std::string> ManagerImpl::getCurrentAudioDevicesIndex () int ManagerImpl::isIax2Enabled (void) { -#ifdef USE_IAX - return true; -#else - return false; -#endif + return HAVE_IAX; } int ManagerImpl::isRingtoneEnabled (const std::string& id) diff --git a/sflphone-common/test/history-sample.tpl b/sflphone-common/test/history-sample.tpl index fdc86d4113c06860d94c3dd9bd5e773443958dc1..2fe78d9eddca5111d8fb8ac55552d8b5284dfd6c 100644 --- a/sflphone-common/test/history-sample.tpl +++ b/sflphone-common/test/history-sample.tpl @@ -1,16 +1,4 @@ -[1827389202] -accountid= -confid= -id=Account:1239059899 -name=Emmanuel Milou -number=136 -recordfile= -timeadded= -timestamp_start=747638685 -timestamp_stop=747638765 -type=2 - -[264770330] +[1688219219] accountid=empty confid= id= @@ -22,7 +10,7 @@ timestamp_start=144562000 timestamp_stop=144562458 type=0 -[37710036] +[1828895003] accountid= confid= id=Account:43789459478 @@ -34,3 +22,15 @@ timestamp_start=775354456 timestamp_stop=775354987 type=1 +[2049190489] +accountid= +confid= +id=Account:1239059899 +name=Emmanuel Milou +number=136 +recordfile= +timeadded= +timestamp_start=747638685 +timestamp_stop=747638765 +type=2 + diff --git a/sflphone-common/test/sflphoned-sample.yml b/sflphone-common/test/sflphoned-sample.yml index 2ac9bbb5d7d27793bcc42c73731b295fc82c9699..7542af76c35d9e14afd46990614d7ed61b18c90e 100644 --- a/sflphone-common/test/sflphoned-sample.yml +++ b/sflphone-common/test/sflphoned-sample.yml @@ -55,7 +55,7 @@ preferences: historyMaxCalls: 20 md5Hash: false notifyMails: false - order: Account:1312398082/Account:1312398066/Account:1309188361/Account:1309187807/Account:1309187723/Account:1309187670/Account:1309187609/Account:1309187081/Account:1308839853/Account:1308839662/Account:1308839447/Account:1308839359/Account:1308839335/Account:1308838875/Account:1308838713/Account:1308838236/Account:1307975440/Account:1307975347/Account:1307974800/Account:1307974672/Account:1307974527/Account:1303487773/Account:1303247743/Account:1302895321/Account:1302892836/Account:1302891834/Account:1302882519/Account:1302207377/Account:1302207262/Account:1302204136/Account:1302204108/Account:1294850905/Account:1294850775/Account:1294850618/Account:1294849651/Account:1294849602/Account:1294849310/Account:1288964768/Account:1288964603/Account:1288964434/Account:1288964141/Account:1288964134/ + order: Account:1312584532/Account:1312398082/Account:1312398066/Account:1309188361/Account:1309187807/Account:1309187723/Account:1309187670/Account:1309187609/Account:1309187081/Account:1308839853/Account:1308839662/Account:1308839447/Account:1308839359/Account:1308839335/Account:1308838875/Account:1308838713/Account:1308838236/Account:1307975440/Account:1307975347/Account:1307974800/Account:1307974672/Account:1307974527/Account:1303487773/Account:1303247743/Account:1302895321/Account:1302892836/Account:1302891834/Account:1302882519/Account:1302207377/Account:1302207262/Account:1302204136/Account:1302204108/Account:1294850905/Account:1294850775/Account:1294850618/Account:1294849651/Account:1294849602/Account:1294849310/Account:1288964768/Account:1288964603/Account:1288964434/Account:1288964141/Account:1288964134/ portNum: 5060 registrationExpire: 180 searchBarDisplay: true