From 20347c800a11adfe3931dc3c56376c30451bf5e4 Mon Sep 17 00:00:00 2001
From: Alexandre Bourget <alexandre.bourget@savoirfairelinux.com>
Date: Fri, 31 Aug 2007 18:09:44 -0400
Subject: [PATCH] Minor fixes and documentation fixes.

---
 doc/doxygen/Doxyfile-server | 11 ++++-------
 src/audio/audiortp.cpp      |  2 +-
 src/audio/audiortp.h        |  6 +++++-
 src/managerimpl.cpp         | 11 ++++++++++-
 4 files changed, 20 insertions(+), 10 deletions(-)

diff --git a/doc/doxygen/Doxyfile-server b/doc/doxygen/Doxyfile-server
index 4dea46ef60..9cf8b25b0f 100644
--- a/doc/doxygen/Doxyfile-server
+++ b/doc/doxygen/Doxyfile-server
@@ -224,14 +224,12 @@ EXTRACT_ALL            = YES
 # If the EXTRACT_PRIVATE tag is set to YES all private members of a class 
 # will be included in the documentation.
 
-EXTRACT_PRIVATE        = NO
-EXTRACT_PRIVATE = YES
+EXTRACT_PRIVATE        = YES
 
 # If the EXTRACT_STATIC tag is set to YES all static members of a file 
 # will be included in the documentation.
 
-EXTRACT_STATIC         = NO
-EXTRACT_STATIC = YES
+EXTRACT_STATIC         = YES
 
 # If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) 
 # defined locally in source files will be included in the documentation. 
@@ -244,8 +242,7 @@ EXTRACT_LOCAL_CLASSES  = YES
 # the interface are included in the documentation. 
 # If set to NO (the default) only methods in the interface are included.
 
-EXTRACT_LOCAL_METHODS  = NO
-EXTRACT_LOCAL_METHODS = YES
+EXTRACT_LOCAL_METHODS  = YES
 
 # If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all 
 # undocumented members of documented classes, files or namespaces. 
@@ -720,7 +717,7 @@ ENUM_VALUES_PER_LINE   = 4
 # Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are 
 # probably better off using the HTML help feature.
 
-GENERATE_TREEVIEW      = NO
+GENERATE_TREEVIEW      = YES
 
 # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be 
 # used to set the initial width (in pixels) of the frame in which the tree 
diff --git a/src/audio/audiortp.cpp b/src/audio/audiortp.cpp
index e7a4da10cf..c0cc584bfb 100644
--- a/src/audio/audiortp.cpp
+++ b/src/audio/audiortp.cpp
@@ -380,7 +380,7 @@ AudioRtpRTX::receiveSessionForSpkr (int& countTime)
       int expandedSize = audiocodec->codecDecode(_receiveDataDecoded, data, size);
       int nbInt16      = expandedSize / sizeof(int16);
       if (nbInt16 > RTP_20S_8KHZ_MAX) {
-        _debug("We have decoded a RTP packet larger than expected: %s VS %s. crop\n", nbInt16, RTP_20S_8KHZ_MAX);
+        _debug("We have decoded an RTP packet larger than expected: %s VS %s. Cropping.\n", nbInt16, RTP_20S_8KHZ_MAX);
         nbInt16=RTP_20S_8KHZ_MAX;
       }
 
diff --git a/src/audio/audiortp.h b/src/audio/audiortp.h
index 6e9694d59d..720e5a9e9a 100644
--- a/src/audio/audiortp.h
+++ b/src/audio/audiortp.h
@@ -77,9 +77,13 @@ private:
   /** Debugging output file */
   //std::ofstream _fstream;
 
-  /** libsamplerate-related */
+   /** libsamplerate converter for incoming voice */
   SRC_STATE*    _src_state_spkr;
+
+  /** libsamplerate converter for outgoing voice */
   SRC_STATE*    _src_state_mic;
+
+  /** libsamplerate error */
   int           _src_err;
 
   void initAudioRtpSession(void);
diff --git a/src/managerimpl.cpp b/src/managerimpl.cpp
index ce0ec46b05..eb2a4af1a4 100644
--- a/src/managerimpl.cpp
+++ b/src/managerimpl.cpp
@@ -224,6 +224,7 @@ ManagerImpl::answerCall(const CallID& id)
 
   if (!getAccountLink(accountid)->answer(id)) {
     // error when receiving...
+    
     removeCallAccount(id);
     return false;
   }
@@ -582,7 +583,9 @@ bool
 ManagerImpl::incomingCall(Call* call, const AccountID& accountId) 
 {
   _debug("Incoming call\n");
+
   associateCallToAccount(call->getCallId(), accountId);
+
   if ( !hasCurrentCall() ) {
     call->setConnectionState(Call::Ringing);
     ringtone();
@@ -594,11 +597,17 @@ ManagerImpl::incomingCall(Call* call, const AccountID& accountId)
   std::string from = call->getPeerName();
   std::string number = call->getPeerNumber();
 
-  if ( !number.empty() ) {
+  if (from != "" && number != "") {
     from.append(" <");
     from.append(number);
     from.append(">");
+  } else if ( from.empty() ) {
+    from.append("<");
+    from.append(number);
+    from.append(">");
   }
+  // otherwise, leave 'from' as is.
+
   _gui->incomingCall(accountId, call->getCallId(), from);
 
   return true;
-- 
GitLab