]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Tweaks
authorSteve Underwood <steveu@haswell.coppice.org>
Sat, 19 Oct 2013 10:51:50 +0000 (18:51 +0800)
committerSteve Underwood <steveu@haswell.coppice.org>
Sat, 19 Oct 2013 10:51:50 +0000 (18:51 +0800)
libs/spandsp/src/libspandsp.2012.vcxproj.filters
src/mod/applications/mod_spandsp/udptl.c

index dea495c3287834d090985204db824f4a3e2e2938..bc694efb840590ad8ae87930609ada70a1c6edc3 100644 (file)
     <ClInclude Include="spandsp.h">\r
       <Filter>Header Files</Filter>\r
     </ClInclude>\r
-    <ClInclude Include="spandsp\t4_t6_decode.h" />\r
-    <ClInclude Include="spandsp\t4_t6_encode.h" />\r
+    <ClInclude Include="spandsp\t4_t6_decode.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="spandsp\t4_t6_encode.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
     <ClInclude Include="spandsp\ademco_contactid.h">\r
       <Filter>Header Files</Filter>\r
     </ClInclude>\r
index 9de1a915cccdf4554bb4f7a934156dd37c3a5b4f..45fa6b6ffc8518c2c2f77a9170918aa1406a2349 100644 (file)
@@ -205,7 +205,8 @@ int udptl_rx_packet(udptl_state_t *s, const uint8_t buf[], int len)
        /* Save the new packet. Pure redundancy mode won't use this, but some systems will switch
           into FEC mode after sending some redundant packets. */
        x = seq_no & UDPTL_BUF_MASK;
-       memcpy(s->rx[x].buf, msg, msg_len);
+    if (msg_len > 0)
+       memcpy(s->rx[x].buf, msg, msg_len);
        s->rx[x].buf_len = msg_len;
        s->rx[x].fec_len[0] = 0;
        s->rx[x].fec_span = 0;
@@ -288,7 +289,8 @@ int udptl_rx_packet(udptl_state_t *s, const uint8_t buf[], int len)
                                return -1;
 
                        /* Save the new FEC data */
-                       memcpy(s->rx[x].fec[i], data, s->rx[x].fec_len[i]);
+            if (s->rx[x].fec_len[i])
+                       memcpy(s->rx[x].fec[i], data, s->rx[x].fec_len[i]);
 #if 0
                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "FEC: ");
                        for (j = 0; j < s->rx[x].fec_len[i]; j++)