Hello,
If udp-receiver is writing to a pipe and the pipe fails, udp-receiver
will incorrectly exit with a returncode of zero. This is easily tested
with a trivial pipe program that copies stdin to stdout, but exits with
a nonzero status upon encountering eof.
Adding the following to startReceiver() in udpr-negotiate.c is
sufficient to fix this behavior:
<---- cut here
int ret;
...
if(pipePid) {
ret=udpc_waitForProcess(pipePid, "Pipe");
}
...
return ret;
<---- cut here
Regards,
George Coulouris
National Center for Biotechnology Information (contractor)
Hello,
While using udpcast, I found out that it may be very verbose on stderr, even if
a logfile is specified.
This turns out to be a problem for our embedded application where the stderr is
a (slow) serial port.
So here is a patch which replace every occurrence of fprint(sdterr,...) by the
flprintf() function defined in log.c.
I thought it might be of some use for people.
(This patch also happen to cleanup the blank spaces at end of lines)
Julien
--
People in the embedded space don't do prototypes. They hack something until it
works, then it's done.
---
Always code as if the person who will maintain your code is a maniac serial
killer that knows where you live
I want to use Udpcast from iso image in this scenario:
- first pc boots from udpcast iso image
-second pc boots from ethernet using pxe that sends him udpreceiver How can
I do it?
thanks
Hello,
I've made the attached patch to prevent the situation where the udp-receiver
hang out indefinitly waiting for data when the server has been killed after
having started to send data.
In this case, the udp-received program would hang indefinitly.
Since in my program, udp-receiver is called through system(...); the result is
a hang.
With this patch I use a SIGALARM signal to reset a flag to 0, and act as a
watchdog. The watchdog is started just before the sending data phase of the
protocol, and is feed each time a packet is received from the server.
If 2 times in a row the watchdog is not feed, the program exit in error.
The current value is set as a #define as 60s, which is in effect 2mn before
udp-receiver is actually killed.
However I am aware that this implementation is somehow crude, and I would be
interested by any other way to do that.
Additionally, if someone is interested by this patch, I could make it so that
the watchdog period is configurable on the command-line.
Thanks for your time,
Julien
--
People in the embedded space don't do prototypes. They hack something until it
works, then it's done.
---
Always code as if the person who will maintain your code is a maniac serial
killer that knows where you live
I tried booting a recent Apple iMac with the latest kernel and an
initrd from cast-o-matic, but the kayboard fails to work.
Looking at an installed Debian system, the module hid_apple is loaded.
Is this driver missing from the udpcast images, and is it possible to
add it?
--
Frederik Himpe <fhimpe(a)vub.ac.be>
Vrije Universiteit Brussel
Hello,
I´m using latest udpcast versión (20100130) in Debian machines to transfer
files in unidirectional mode. Sometimes I see the next message in receiver
machine: Receiver error
After putting some fprintf I realized the problem is in the file
udpr-negotiate.c in line 191:
sock = udpc_selectSock(client_config.socks, NR_CLIENT_SOCKS,
net_config->startTimeout);
if(sock < 0) {
return -1;
}
Why sock is < 0? What should I do?
Thanks