keep pushing data through dotdraw plugin
authorHenning Rogge <henning.rogge@fkie.fraunhofer.de>
Thu, 19 Feb 2015 07:47:21 +0000 (08:47 +0100)
committerHenning Rogge <henning.rogge@fkie.fraunhofer.de>
Thu, 19 Feb 2015 07:47:21 +0000 (08:47 +0100)
lib/dot_draw/src/olsrd_dot_draw.c

index b6a7392..a56b72e 100644 (file)
@@ -300,7 +300,7 @@ dotdraw_write_data(void *foo __attribute__ ((unused))) {
     if (result > 0)
       abuf_pull(&outbuffer, result);
 
-    if (result <= 0) {
+    if (result < 0) {
       /* close this socket and cleanup*/
       close(outbuffer_socket);
       abuf_free(&outbuffer);
@@ -309,14 +309,6 @@ dotdraw_write_data(void *foo __attribute__ ((unused))) {
       outbuffer_socket = -1;
     }
   }
-  if (outbuffer.len == 0) {
-    /* close this socket and cleanup*/
-    close(outbuffer_socket);
-    abuf_free(&outbuffer);
-    olsr_stop_timer(writetimer_entry);
-    writetimer_entry = NULL;
-    outbuffer_socket = -1;
-  }
 }
 
 /**