Index: trunk/BNC/bncnetqueryrtp.cpp
===================================================================
--- trunk/BNC/bncnetqueryrtp.cpp	(revision 1531)
+++ trunk/BNC/bncnetqueryrtp.cpp	(revision 1532)
@@ -46,9 +46,24 @@
   _eventLoop->quit();
   _status = finished;
-  QByteArray reqStr = "TEARDOWN " + _url.toEncoded() + " RTSP/1.0\r\n"
-                    + "CSeq: " + QString("%1").arg(++_CSeq).toAscii() + "\r\n"
-                    + "Session: " + _session + "\r\n"
-                    + "\r\n";
-  _socket->write(reqStr, reqStr.length());
+  if (_socket) {
+    QByteArray reqStr = "TEARDOWN " + _url.toEncoded() + " RTSP/1.0\r\n"
+                      + "CSeq: " + QString("%1").arg(++_CSeq).toAscii() + "\r\n"
+                      + "Session: " + _session + "\r\n"
+                      + "\r\n";
+    _socket->write(reqStr, reqStr.length());
+  }
+}
+
+// 
+////////////////////////////////////////////////////////////////////////////
+void bncNetQueryRtp::slotKeepAlive() {
+  if (_socket) {
+    QByteArray reqStr = "GET_PARAMETER " + _url.toEncoded() + " RTSP/1.0\r\n"
+                      + "CSeq: " + QString("%1").arg(++_CSeq).toAscii() + "\r\n"
+                      + "Session: " + _session + "\r\n"
+                      + "\r\n";
+    _socket->write(reqStr, reqStr.length());
+  }
+  QTimer::singleShot(30000, this, SLOT(slotKeepAlive()));
 }
 
@@ -200,4 +215,5 @@
                                   _url.path().toAscii() + 
                                   ": UDP connection established", true);
+                  slotKeepAlive();
                   return;
                 }
Index: trunk/BNC/bncnetqueryrtp.h
===================================================================
--- trunk/BNC/bncnetqueryrtp.h	(revision 1531)
+++ trunk/BNC/bncnetqueryrtp.h	(revision 1532)
@@ -5,4 +5,5 @@
 
 class bncNetQueryRtp : public bncNetQuery {
+ Q_OBJECT
  public:
   bncNetQueryRtp();
@@ -13,4 +14,7 @@
   virtual void startRequest(const QUrl& url, const QByteArray& gga);
   virtual void waitForReadyRead(QByteArray& outData);
+
+ private slots:
+  void slotKeepAlive();
 
  private:
