aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/rtp_proxy.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-03-22 03:25:11 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-03-24 06:16:04 +0100
commit22481bf76d129d3c41d20b96b6587ef085be485b (patch)
tree8c8de852e945dd5422a83bc7e0c37548d2911fe2 /openbsc/src/rtp_proxy.c
parentb973955295b720b8ba7c556d0165750ed9bfb381 (diff)
parent61b4232c6363ff9d78ef73b9dbf47ec16c94d610 (diff)
Merge remote branch 'origin/master' into on-waves/bsc-master
* Move to libosmocore * Move to new debugging architecture * Register the BTS types * Has only been compile tested Conflicts: openbsc/include/openbsc/Makefile.am openbsc/include/openbsc/gsm_data.h openbsc/include/openbsc/ipaccess.h openbsc/include/openbsc/mgcp.h openbsc/include/openbsc/msgb.h openbsc/include/openbsc/tlv.h openbsc/src/Makefile.am openbsc/src/abis_rsl.c openbsc/src/bsc_init.c openbsc/src/bsc_mgcp.c openbsc/src/chan_alloc.c openbsc/src/debug.c openbsc/src/gsm_subscriber_base.c openbsc/src/msgb.c openbsc/src/rest_octets.c openbsc/src/sccp/sccp.c openbsc/src/vty/command.c openbsc/src/vty_interface.c openbsc/tests/Makefile.am
Diffstat (limited to 'openbsc/src/rtp_proxy.c')
-rw-r--r--openbsc/src/rtp_proxy.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/openbsc/src/rtp_proxy.c b/openbsc/src/rtp_proxy.c
index 0f4e32799..9f2e2fd76 100644
--- a/openbsc/src/rtp_proxy.c
+++ b/openbsc/src/rtp_proxy.c
@@ -19,6 +19,7 @@
*
*/
+#include <endian.h>
#include <errno.h>
#include <unistd.h>
#include <sys/socket.h>
@@ -29,10 +30,10 @@
#include <time.h> /* clock() */
#include <sys/utsname.h> /* uname() */
-#include <openbsc/talloc.h>
+#include <osmocore/talloc.h>
#include <openbsc/gsm_data.h>
-#include <openbsc/msgb.h>
-#include <openbsc/select.h>
+#include <osmocore/msgb.h>
+#include <osmocore/select.h>
#include <openbsc/debug.h>
#include <openbsc/rtp_proxy.h>
@@ -63,12 +64,21 @@ struct rtcp_hdr {
/* according to RFC 3550 */
struct rtp_hdr {
+#if __BYTE_ORDER == __LITTLE_ENDIAN
u_int8_t csrc_count:4,
extension:1,
padding:1,
version:2;
u_int8_t payload_type:7,
marker:1;
+#elif __BYTE_ORDER == __BIG_ENDIAN
+ u_int8_t version:2,
+ padding:1,
+ extension:1,
+ csrc_count:4;
+ u_int8_t marker:1,
+ payload_type:7;
+#endif
u_int16_t sequence;
u_int32_t timestamp;
u_int32_t ssrc;
@@ -240,7 +250,8 @@ int rtp_send_frame(struct rtp_socket *rs, struct gsm_data_frame *frame)
if (abs(frame_diff) > 1) {
long int frame_diff_excess = frame_diff - 1;
- DEBUGP(DMUX, "Correcting frame difference of %ld frames\n", frame_diff_excess);
+ LOGP(DMUX, LOGL_NOTICE,
+ "Correcting frame difference of %ld frames\n", frame_diff_excess);
rs->transmit.sequence += frame_diff_excess;
rs->transmit.timestamp += frame_diff_excess * duration;
}