From 0a18b90fb664d695ffe815cf602501878bf74698 Mon Sep 17 00:00:00 2001 From: jwindley <jwindley@unknown> Date: Fri, 14 Nov 2003 01:05:04 +0000 Subject: [PATCH] Don't report EOF as error --- src/plugins/sched/prefix_courier.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/plugins/sched/prefix_courier.cpp b/src/plugins/sched/prefix_courier.cpp index c2cb491e505..90443c91bb9 100644 --- a/src/plugins/sched/prefix_courier.cpp +++ b/src/plugins/sched/prefix_courier.cpp @@ -47,14 +47,16 @@ prefix_courier_t::receive( void ) char *buf; // * Read the packet size. - if ( read_bytes( header, 9 ) != 9 ) { - debug( "prefix_courier::receive: malformed message header" ); + if ( courier_t::read_bytes( header, 9 ) != 9 ) { + if ( errno != 0 ) + debug( "prefix_courier::receive: malformed header (wire)" ); return NULL; } // * Convert to binary. if ( sscanf( header, "%ul", &size ) != 1 ) { - debug( "prefix_courier::receive: malformed message header" ); + if ( errno != 0 ) + debug( "prefix_courier::receive: malformed header (decode)" ); return NULL; } @@ -63,7 +65,7 @@ prefix_courier_t::receive( void ) xassert( buf ); // * Read the actual packet data. - if ( read_bytes( buf, size ) != size ) { + if ( courier_t::read_bytes( buf, size ) != size ) { debug( "prefix_courier::receive: unable to receive fixed-length data" ); delete [] buf; return NULL; -- GitLab