Index: trunk/BNC/bncnetqueryrtp.cpp
===================================================================
--- trunk/BNC/bncnetqueryrtp.cpp	(revision 1529)
+++ trunk/BNC/bncnetqueryrtp.cpp	(revision 1530)
@@ -29,4 +29,5 @@
   _socket    = 0;
   _udpSocket = 0;
+  _CSeq      = 0;
   _eventLoop = new QEventLoop(this);
 }
@@ -124,5 +125,5 @@
     QByteArray reqStr;
     reqStr = "SETUP " + _url.toEncoded() + " RTSP/1.0\r\n"
-           + "CSeq: 1\r\n"
+           + "CSeq: " + QString("%1").arg(++_CSeq).toAscii() + "\r\n"
            + "Ntrip-Version: Ntrip/2.0\r\n"
            + "Ntrip-Component: Ntripclient\r\n"
@@ -138,10 +139,9 @@
       if (_socket->waitForReadyRead(timeOut)) {
         QTextStream in(_socket);
-        QByteArray session;
         QByteArray serverPort;
         QString line = in.readLine();
         while (!line.isEmpty()) {
           if (line.indexOf("Session:") == 0) {
-            session = line.mid(9).toAscii();
+            _session = line.mid(9).toAscii();
           }
           int iSrv = line.indexOf("server_port=");
@@ -154,10 +154,10 @@
         // Send Request 2
         // --------------
-        if (!session.isEmpty()) { 
+        if (!_session.isEmpty()) { 
 
           // Send initial RTP packet for firewall handling
           // ---------------------------------------------
           if (!serverPort.isEmpty()) {
-            int sessInt = session.toInt();
+            int sessInt = _session.toInt();
             char rtpbuffer[12];
             rtpbuffer[0]  = (2<<6);
@@ -179,6 +179,6 @@
 
           reqStr = "PLAY " + _url.toEncoded() + " RTSP/1.0\r\n"
-                 + "CSeq: 2\r\n"
-                 + "Session: " + session + "\r\n"
+                 + "CSeq: " + QString("%1").arg(++_CSeq).toAscii() + "\r\n"
+                 + "Session: " + _session + "\r\n"
                  + "\r\n";
           _socket->write(reqStr, reqStr.length());
