Prevent continious UGET for eof attribute.
[rugen] / src / page_status.c
index 6ea5661..bd8bd84 100644 (file)
@@ -214,13 +214,15 @@ static void *status_thread( void *arg )
                        char buf[32];
 
                        if ( status.status == unit_disconnected )
+                       {
+                               this->app->eof = 0;
                                break;
+                       }
                        if ( show_status( this, &status ) )
                                show_units( this, TRUE );
-                       if ( mvcp_unit_get( this->app->command, this->app->selected_unit, "eof", buf, sizeof(buf) ) != -1)
-                               this->app->eof = buf[0];
-                       else
-                               this->app->eof = 0;
+                       if ( !this->app->eof && mvcp_unit_get( this->app->command, this->app->selected_unit,
+                               "eof", buf, sizeof(buf) ) != -1)
+                                       this->app->eof = buf[0];
                }
        }