[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r4428 - gnuradio/branches/developers/trondeau/udp/gnur
From: |
trondeau |
Subject: |
[Commit-gnuradio] r4428 - gnuradio/branches/developers/trondeau/udp/gnuradio-core/src/lib/io |
Date: |
Wed, 7 Feb 2007 21:14:31 -0700 (MST) |
Author: trondeau
Date: 2007-02-07 21:14:31 -0700 (Wed, 07 Feb 2007)
New Revision: 4428
Modified:
gnuradio/branches/developers/trondeau/udp/gnuradio-core/src/lib/io/gr_udp_sink.cc
Log:
added error handling on send call
Modified:
gnuradio/branches/developers/trondeau/udp/gnuradio-core/src/lib/io/gr_udp_sink.cc
===================================================================
---
gnuradio/branches/developers/trondeau/udp/gnuradio-core/src/lib/io/gr_udp_sink.cc
2007-02-08 04:11:06 UTC (rev 4427)
+++
gnuradio/branches/developers/trondeau/udp/gnuradio-core/src/lib/io/gr_udp_sink.cc
2007-02-08 04:14:31 UTC (rev 4428)
@@ -143,7 +143,10 @@
bytes_to_send = std::min(d_mtu, (total_size-bytes_sent));
r = send(d_socket, (in+bytes_sent), bytes_to_send, 0);
- // FIX ERROR HANDLING
+ if(r == -1) { // error on send command
+ perror("udp_sink"); // there should be no error case where this function
+ return -1; // should not exit immediately
+ }
bytes_sent += r;
#if SNK_VERBOSE
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r4428 - gnuradio/branches/developers/trondeau/udp/gnuradio-core/src/lib/io,
trondeau <=