From e4d62dc2ad831b3125863ab2b08e4a21b005e36a Mon Sep 17 00:00:00 2001
From: Alexandre Bourget <alexandre.bourget@savoirfairelinux.com>
Date: Wed, 29 Aug 2007 18:52:41 -0400
Subject: [PATCH] Move header requirements (use the globally installed ones)

Use iax/iax-client.h instead of iax-client.h (from libs/libiax2)

Must be fixed, with bug #000010
---
 src/accountcreator.h | 16 ++++++++--------
 src/iaxcall.h        |  2 +-
 src/iaxvoiplink.cpp  |  7 ++++++-
 src/iaxvoiplink.h    |  2 +-
 src/user_cfg.h       |  2 +-
 5 files changed, 17 insertions(+), 12 deletions(-)

diff --git a/src/accountcreator.h b/src/accountcreator.h
index 0023c4e388..105de35c1a 100644
--- a/src/accountcreator.h
+++ b/src/accountcreator.h
@@ -29,12 +29,12 @@ class Account;
  */
 class AccountCreator{
 public:
-    ~AccountCreator();
-   /**
-    * Public account type
-    */
-   enum AccountType {SIP_ACCOUNT, IAX_ACCOUNT };
-
+  ~AccountCreator();
+  /**
+   * Public account type
+   */
+  enum AccountType {SIP_ACCOUNT, IAX_ACCOUNT };
+  
   /**
    * Create a new account or null
    * @param type type of the account
@@ -43,8 +43,8 @@ public:
   static Account* createAccount(AccountType type, AccountID accountID);
 
 private:
-   /** Hidden creator */
-    AccountCreator();
+  /** Hidden creator */
+  AccountCreator();
 };
 
 #endif
diff --git a/src/iaxcall.h b/src/iaxcall.h
index ca6dd24df7..61a32287e6 100644
--- a/src/iaxcall.h
+++ b/src/iaxcall.h
@@ -20,7 +20,7 @@
 #define IAXCALL_H
 
 #include "call.h"
-#include <iax-client.h>
+#include <iax/iax-client.h>
 
 /**
  * IAXCall are IAX implementation of a normal Call 
diff --git a/src/iaxvoiplink.cpp b/src/iaxvoiplink.cpp
index 7721ea0321..2ccf810a01 100644
--- a/src/iaxvoiplink.cpp
+++ b/src/iaxvoiplink.cpp
@@ -26,6 +26,11 @@
 #include "audio/audiolayer.h"
 
 #include <samplerate.h>
+#include <iax/iax-client.h>
+
+
+#define IAX_BLOCKING    1
+#define IAX_NONBLOCKING 0
 
 #define IAX_SUCCESS  0
 #define IAX_FAILURE -1
@@ -178,7 +183,7 @@ IAXVoIPLink::getEvent()
 
   iax_event* event = NULL;
   IAXCall* call = NULL;
-  while ( (event = iax_get_event(TRUE)) != NULL ) {
+  while ( (event = iax_get_event(IAX_BLOCKING)) != NULL ) {
     //_debug ("Receive IAX Event: %d\n", event->etype);
     call = iaxFindCallBySession(event->session);
     if (call != 0) {
diff --git a/src/iaxvoiplink.h b/src/iaxvoiplink.h
index 8d95bf3386..34351203dd 100644
--- a/src/iaxvoiplink.h
+++ b/src/iaxvoiplink.h
@@ -20,7 +20,7 @@
 #define IAXVOIPLINK_H
 
 #include "voIPLink.h"
-#include <iax-client.h>
+#include <iax/iax-client.h>
 #include "global.h"
 
 
diff --git a/src/user_cfg.h b/src/user_cfg.h
index de05b5d506..0d9319d12b 100644
--- a/src/user_cfg.h
+++ b/src/user_cfg.h
@@ -69,7 +69,7 @@
 #define CODEC3			"Codecs.codec3"
 #define RING_CHOICE		"Rings.ringChoice"
 #define ACCOUNT_SIP_COUNT_DEFAULT 4
-#define ACCOUNT_IAX_COUNT_DEFAULT 1
+#define ACCOUNT_IAX_COUNT_DEFAULT 4
 
 // speakers and volume 0 to 100
 #define VOLUME_SPKR	"Volume.speakers"
-- 
GitLab