Path: blob/main/comms/echolinux/files/patch-echolinux_rtpacket.c
16461 views
--- echolinux/rtpacket.c.orig 2002-12-22 03:10:48 UTC1+++ echolinux/rtpacket.c2@@ -1,4 +1,8 @@3#include <stdio.h>4+#include <stdlib.h>5+#include <string.h>6+#include <strings.h>7+#include <arpa/inet.h>8#include "rtp.h"9#include "rtpacket.h"1011@@ -11,6 +15,16 @@ extern char callsign[], name[];1213/*************** RTP_MAKE_SDES *************/1415+static unsigned char *ap;16+static void addSDES(unsigned char item, char *text)17+{18+ int l;19+ *ap++ = item;20+ *ap++ = l = strlen(text);21+ bcopy(text, ap, l);22+ ap += l;23+}24+25int rtp_make_sdes(pkt, ssrc_i, strict)26char **pkt;27unsigned long ssrc_i;28@@ -19,20 +33,11 @@ int rtp_make_sdes(pkt, ssrc_i, strict)29unsigned char zp[1500];30unsigned char *p = zp;31rtcp_t *rp;32- unsigned char *ap;33char *sp, *ep;34char line[180];35int l, hl, i;36struct passwd *pw;37char s[256], ev[1024];38-39- void addSDES(unsigned char item, char *text){40- *ap++ = item;41- *ap++ = l = strlen(text);42- bcopy(text, ap, l);43- ap += l;44- }45-4647hl = 0;48if (strict) {495051