[asterisk-scf-commits] asterisk-scf/integration/media_rtp_pjmedia.git branch "alternate_source_cleanup" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Tue Jul 10 11:54:55 CDT 2012


branch "alternate_source_cleanup" has been updated
       via  44e151d1c320b5e37990b0b4fdbe3650dcbd4114 (commit)
      from  15a6cae74e650fdeec8945b283f5205410b7481f (commit)

Summary of changes:
 src/RTPSource.cpp |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)


- Log -----------------------------------------------------------------
commit 44e151d1c320b5e37990b0b4fdbe3650dcbd4114
Author: Brent Eagles <beagles at digium.com>
Date:   Tue Jul 10 14:24:14 2012 -0230

    Make sure that the structure being handed to the pjlib api for thread
    registration is *clean* for the given thread.

diff --git a/src/RTPSource.cpp b/src/RTPSource.cpp
index eddd36e..fbae703 100644
--- a/src/RTPSource.cpp
+++ b/src/RTPSource.cpp
@@ -78,6 +78,11 @@ public:
      * pjthread thread description information, must persist for the life of the thread
      */
     pj_thread_desc mDesc;
+
+    void reset()
+    {
+        memset(&mDesc, 0, sizeof mDesc);
+    }
 };
 
 /**
@@ -115,6 +120,7 @@ public:
         if (pj_thread_is_registered() == PJ_FALSE)
         {
             pj_thread_t *thread;
+            mThreadDescriptor->reset();
             pj_status_t status = pj_thread_register("ICE Thread", mThreadDescriptor->mDesc, &thread);
             assert(status == PJ_SUCCESS);
         }

-----------------------------------------------------------------------


-- 
asterisk-scf/integration/media_rtp_pjmedia.git



More information about the asterisk-scf-commits mailing list