]> granicus.if.org Git - rtmpdump/commitdiff
Cleanup whitespace
authorhyc <hyc@400ebc74-4327-4243-bc38-086b20814532>
Wed, 10 Mar 2010 07:14:26 +0000 (07:14 +0000)
committerhyc <hyc@400ebc74-4327-4243-bc38-086b20814532>
Wed, 10 Mar 2010 07:14:26 +0000 (07:14 +0000)
git-svn-id: svn://svn.mplayerhq.hu/rtmpdump/trunk@321 400ebc74-4327-4243-bc38-086b20814532

librtmp/rtmp.c
librtmp/rtmp.h

index 870bc03c0ee207dec360cab3747498755a9ec1f3..20106d6246d3a18f290a74d388640c93b8692680 100644 (file)
@@ -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;
 }
index 603ca74d2888f3a1b0bc1c6e7f278008f72be54f..27be1e5359f2b1d04273cec50aecb3fb5ac565bd 100644 (file)
@@ -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;