From: hyc Date: Wed, 10 Mar 2010 07:14:26 +0000 (+0000) Subject: Cleanup whitespace X-Git-Tag: v2.4~214 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e9037c62b07e785c09410ba85c92766e870dc7b2;p=rtmpdump Cleanup whitespace git-svn-id: svn://svn.mplayerhq.hu/rtmpdump/trunk@321 400ebc74-4327-4243-bc38-086b20814532 --- diff --git a/librtmp/rtmp.c b/librtmp/rtmp.c index 870bc03..20106d6 100644 --- a/librtmp/rtmp.c +++ b/librtmp/rtmp.c @@ -451,8 +451,6 @@ RTMP_Connect0(RTMP *r, struct sockaddr * service) return true; } -#define AGENT "Mozilla/5.0" - bool RTMP_Connect1(RTMP *r, RTMPPacket *cp) { @@ -474,7 +472,7 @@ RTMP_Connect1(RTMP *r, RTMPPacket *cp) r->m_clientID.av_len = 0; HTTP_Post(r, RTMPT_OPEN, "", 1); HTTP_read(r, 1); - r->m_msgCounter = 0; + r->m_msgCounter = 0; } Log(LOGDEBUG, "%s, ... connected, handshaking", __FUNCTION__); if (!HandShake(r, true)) @@ -869,10 +867,10 @@ ReadN(RTMP *r, char *buffer, int n) if (fill) HTTP_Post(r, RTMPT_IDLE, "", 1); while (r->m_unackd && !r->m_resplen) - { + { HTTP_read(r, fill); - fill = r->m_sb.sb_size == 0; - } + fill = r->m_sb.sb_size == 0; + } } else if (RTMPSockBuf_Fill(&r->m_sb) < 1) { @@ -2741,7 +2739,7 @@ HTTP_Post(RTMP *r, RTMPTCmd cmd, const char *buf, int len) "Cache-Control: no-cache\r\n" "Content-type: application/x-fcs\r\n" "Content-length: %d\r\n\r\n", RTMPT_cmds[cmd], - r->m_clientID.av_val ? r->m_clientID.av_val : "", + r->m_clientID.av_val ? r->m_clientID.av_val : "", r->m_msgCounter, r->Link.hostname, r->Link.port, len); RTMPSockBuf_Send(&r->m_sb, hbuf, hlen); hlen = RTMPSockBuf_Send(&r->m_sb, buf, len); @@ -2776,20 +2774,20 @@ HTTP_read(RTMP *r, int fill) if (!r->m_clientID.av_val) { - r->m_clientID.av_len = hlen; - r->m_clientID.av_val = malloc(hlen+1); - if (!r->m_clientID.av_val) - return -1; - r->m_clientID.av_val[0] = '/'; - memcpy(r->m_clientID.av_val+1, ptr, hlen-1); - r->m_sb.sb_size = 0; - } + r->m_clientID.av_len = hlen; + r->m_clientID.av_val = malloc(hlen+1); + if (!r->m_clientID.av_val) + return -1; + r->m_clientID.av_val[0] = '/'; + memcpy(r->m_clientID.av_val+1, ptr, hlen-1); + r->m_sb.sb_size = 0; + } else { - r->m_polling = *ptr++; - r->m_resplen = hlen - 1; - r->m_sb.sb_start++; - r->m_sb.sb_size--; - } + r->m_polling = *ptr++; + r->m_resplen = hlen - 1; + r->m_sb.sb_start++; + r->m_sb.sb_size--; + } return 0; } diff --git a/librtmp/rtmp.h b/librtmp/rtmp.h index 603ca74..27be1e5 100644 --- a/librtmp/rtmp.h +++ b/librtmp/rtmp.h @@ -212,9 +212,9 @@ extern "C" double m_fDuration; // duration of stream in seconds int m_msgCounter; /* RTMPT stuff */ - int m_polling; - int m_resplen; - int m_unackd; + int m_polling; + int m_resplen; + int m_unackd; AVal m_clientID; RTMPSockBuf m_sb;