Index: trunk/BNC/bncapp.cpp
===================================================================
--- trunk/BNC/bncapp.cpp	(revision 591)
+++ trunk/BNC/bncapp.cpp	(revision 592)
@@ -514,5 +514,5 @@
   // ----------------
   if (_ephStreamGPS) {
-    *_ephStreamGPS << allLines << endl;
+    *_ephStreamGPS << allLines;
     _ephStreamGPS->flush();
   }
@@ -580,5 +580,5 @@
   // ----------------
   if (_ephStreamGlonass) {
-    *_ephStreamGlonass << allLines << endl;
+    *_ephStreamGlonass << allLines;
     _ephStreamGlonass->flush();
   }
Index: trunk/BNC/bncapp.h
===================================================================
--- trunk/BNC/bncapp.h	(revision 591)
+++ trunk/BNC/bncapp.h	(revision 592)
@@ -39,4 +39,5 @@
     virtual ~bncApp();  
     QString bncVersion() const {return _bncVersion;}
+    void    setPort(int port);
   public slots:
     void slotMessage(const QByteArray msg);
Index: trunk/BNC/bncmain.cpp
===================================================================
--- trunk/BNC/bncmain.cpp	(revision 591)
+++ trunk/BNC/bncmain.cpp	(revision 592)
@@ -103,4 +103,6 @@
                                       settings.value("outPort").toInt());
 
+    app.setPort(settings.value("outEphPort").toInt());
+
     app.connect(caster, SIGNAL(getThreadErrors()), &app, SLOT(quit()));
     app.connect(caster, SIGNAL(newMessage(const QByteArray&)), 
Index: trunk/BNC/bncwindow.cpp
===================================================================
--- trunk/BNC/bncwindow.cpp	(revision 591)
+++ trunk/BNC/bncwindow.cpp	(revision 592)
@@ -513,5 +513,7 @@
 
   _caster = new bncCaster(_outFileLineEdit->text(), 
-                             _outPortLineEdit->text().toInt());
+                          _outPortLineEdit->text().toInt());
+
+  ((bncApp*)qApp)->setPort(_outEphPortLineEdit->text().toInt());
 
   connect(_caster, SIGNAL(getThreadErrors()), 
