Teresa Noviello wrote:
> On 9/5/06, Teresa Noviello <[EMAIL PROTECTED]> wrote:
>>
>> On 9/5/06, Jan Kiszka <[EMAIL PROTECTED]> wrote:
>>
>> > Teresa Noviello wrote:
>> > > Hi! I have modified rtt-sender.c and rtt-responder.c in the way you
>> > see in
>> > > attachments, i use them in two different shells with the two commands
>> > (on
>> > > the same machine):
>> > >
>> > > 1. ./rtt-sender -d 127.0.0.1
>> > > 2. ./rtt-responder -l 127.0.0.1
>> > >
>> > > rtt-sender goes in Segmentation Fault and rtt-responder remains up.
>> > What i
>> > > do wrong?
>> > >
>> > > I see in debug messages that sendto_rt in transmitter function
>> > doesnt't
>> > > send
>> > > anything! Why?
>> > > the messages are:
>> > >
>> > > sendo failed - perror: Success.
>> >
>> > This is due to the fact that sendto_rt is not the POSIX variant, it's
>> > the native real-time interface (and its obsolete, new naming scheme:
>> > rt_dev_sendto). Only the wrapped POSIX sendto would set errno
>> correctly,
>> > but I'm not up-to-date with the RTAI status here. So, try to catch the
>> > result of sendto_rt directly and print that one.
>>
>>
>>
>> The sendto_rt result is: 1
>>
>> I have no idea of what does it mean.
>>
> 
> 
> Sorry, i made a mistake.
> 
> The return value of send_to is "-9" and is not in the switch_errno error
> list, because i call that function and i know that.
> 

What about using strerror()? :)

> What can i do with this number? where i have to search to understand
> what is
> it?
> 

EBADF. That file descriptor is invalid. Do you close the socket
prematurely due to some other error? Check if the main loop is left too
early!

Jan


PS: Here is a tiny script called errno on my box that looks up error
codes (errno <no>) or to lists them all (when called without arguments):

#!/bin/sh
ERRNO_HEADERS="/usr/include/asm-generic/errno-base.h \
    /usr/include/asm-generic/errno.h"
if [ "$1" == "" ]; then
    ERR="[[:digit:]]+"
else
    ERR=$1
fi
cat $ERRNO_HEADERS | grep -E "[[:space:]]$ERR[[:space:]]/"

Attachment: signature.asc
Description: OpenPGP digital signature

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
RTnet-users mailing list
RTnet-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rtnet-users

Reply via email to