From: jonathan mzengeza <jtmze87@gmail.com>
To: The list for a Better Approach To Mobile Ad-hoc Networking
<b.a.t.m.a.n@lists.open-mesh.net>
Subject: Re: [B.A.T.M.A.N.] [vis] fixed partial json output
Date: Fri, 17 Jul 2009 09:10:55 +0200 [thread overview]
Message-ID: <1739bfe0907170010n67ae2bd8m9bf9813d09687951@mail.gmail.com> (raw)
In-Reply-To: <200907161900.54293.lindner_marek@yahoo.de>
I looked at the site and it talked about something I had already tried
which works well. Here is another patch hope its better.
Signed-off-by: Jonathan Mzengeza <jtmze87@gmail.com>
Index: vis.c
===================================================================
--- vis.c (revision 1343)
+++ vis.c (working copy)
@@ -566,6 +566,7 @@
buffer_t *last_send = NULL;
size_t ret;
char* send_buffer = NULL;
+ char tmp[4096];
while ( !is_aborted() ) {
@@ -600,6 +601,17 @@
}
+ shutdown(thread_data->socket, SHUT_WR);
+
+ for(;;) {
+ ret=read(thread_data->socket, tmp, sizeof(tmp));
+ if(ret < 0) {
+ break;
+ }
+ if(!ret) {
+ break;
+ }
+ }
if ( debug_level > 0 )
debug_output( "TCP client has left: %s \n", thread_data->ip );
next prev parent reply other threads:[~2009-07-17 7:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-15 13:49 [B.A.T.M.A.N.] [vis] fixed partial json output jonathan mzengeza
2009-07-15 13:56 ` Sven Eckelmann
2009-07-15 14:26 ` jonathan mzengeza
2009-07-15 18:50 ` Sven Eckelmann
2009-07-16 5:49 ` Antoine van Gelder
2009-07-16 7:36 ` Sven Eckelmann
2009-07-16 7:45 ` Antoine van Gelder
2009-07-16 11:00 ` Marek Lindner
2009-07-17 7:10 ` jonathan mzengeza [this message]
2009-07-17 18:53 ` Marek Lindner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1739bfe0907170010n67ae2bd8m9bf9813d09687951@mail.gmail.com \
--to=jtmze87@gmail.com \
--cc=b.a.t.m.a.n@lists.open-mesh.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox