Date: Wed, 2 Nov 2005 00:04:36 EST-10EDT,10,-1,0,7200,3,-1,0,7200,3600 Subject: [UnixOS2_Archive] No. 644 ************************************************** Tuesday 01 November 2005 Number 644 ************************************************** Subjects for today 1 Re: Help me understand this code : Andrew MacIntyre 2 Re: Help me understand this code : Paul Smedley 3 Re: Help me understand this code : Dave Yeo" 4 Amateur porter got stuck : Dave Bamford **= Email 1 ==========================** Date: Mon, 31 Oct 2005 22:57:54 +1000 From: Andrew MacIntyre Subject: Re: Help me understand this code Paul Smedley wrote: > The line I don't understand is "flags |= O_NONBLOCK;" what does |= mean? Set flags to the current flags value bitwise ORed with O_NONBLOCK. In effect, set the O_NONBLOCK flag bit if its not already set. You might want to get the actual errno and decode it yourself rather than relying on isc__strerror() to print a useful error message... ------------------------------------------------------------------------- Andrew I MacIntyre "These thoughts are mine alone..." E-mail: andymac at bullseye.apana.org.au (pref) | Snail: PO Box 370 andymac at pcug.org.au (alt) | Belconnen ACT 2616 Web: http://www.andymac.org/ | Australia **= Email 2 ==========================** Date: Tue, 01 Nov 2005 07:13:44 +1030 From: Paul Smedley Subject: Re: Help me understand this code Hi Andy, Andrew MacIntyre wrote: > Paul Smedley wrote: > >> The line I don't understand is "flags |= O_NONBLOCK;" what does |= mean? > > Set flags to the current flags value bitwise ORed with O_NONBLOCK. > > In effect, set the O_NONBLOCK flag bit if its not already set. This is the values and what happens - is this expected behaviour? flags before = 2 (result of flags = fcntl(fd, F_GETFL, 0); ) O_NONBLOCK = 4 (from Innotek GCC fcntl.h) flags after = 6 (after flags |= O_NONBLOCK;) Seems to have just added the two values together? And results in an invalid parameter? > You might want to get the actual errno and decode it yourself rather > than relying on isc__strerror() to print a useful error message... Will look at this tonight - work now :( CHeers, Paul. **= Email 3 ==========================** Date: Mon, 31 Oct 2005 14:57:05 -0700 (PDT) From: "Dave Yeo" Subject: Re: Help me understand this code On Tue, 01 Nov 2005 07:13:44 +1030, Paul Smedley wrote: >>> The line I don't understand is "flags |= O_NONBLOCK;" what does |= mean? >> >> Set flags to the current flags value bitwise ORed with O_NONBLOCK. >> >> In effect, set the O_NONBLOCK flag bit if its not already set. > >This is the values and what happens - is this expected behaviour? >flags before = 2 (result of flags = fcntl(fd, F_GETFL, 0); ) >O_NONBLOCK = 4 (from Innotek GCC fcntl.h) >flags after = 6 (after flags |= O_NONBLOCK;) >Seems to have just added the two values together? And results in an >invalid parameter? Bitwise ORing gives 00000010 (2) OR 00000100 (4) = 00000110 (6) So as you can see ORing 2 and 4 gives 6. Now what is the correct value I don't Know Dave **= Email 4 ==========================** Date: Tue, 01 Nov 2005 11:13:21 +0000 From: Dave Bamford Subject: Amateur porter got stuck This is a multi-part message in MIME format. --------------010200050101000204050304 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Hi For a few weeks now I have been fighting with getting a port of a backup application completed. I have got it to compile with gcc 3.3.5 but I always get a ssl error 5 when trying to connect the client with the server. At this time I am only trying to port the client. I think the problem is with the implimentation of sockets and I don't know enough about the differences between os2 and unix sockets. I am using AF_INET and I have looked at the windows port of this app for some guidance. Perhaps it is my environment setup. If there is anyone who has some time to help it would be greatly appreciated. I have put the files on our website at http://www.logical-progress.com/downloads.php The configuration and keys are set up to use our server as the backup server. The author and website of the code is at http://www.fluffy.co.uk/boxbackup. Thanks Dave Bamford. --------------010200050101000204050304 Content-Type: text/html; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Hi

For a few weeks now I have been fighting with getting a port of a backup
application completed. I have got it to compile with gcc 3.3.5 but I always
get a ssl error 5 when trying to connect the client with the server.
At this time I am only trying to port the client.
I think the problem is with the implimentation of sockets and I don't
know enough about the differences between os2 and unix sockets.
I am using AF_INET and I have looked at the windows port of this app
for some guidance.

Perhaps it is my environment setup.

If there is anyone who has some time to help it would be greatly
appreciated.

I have put the files on our website at
http://www.logical-progress.com/downloads.php

The configuration and keys are set up to use our server as the
backup server. The author and website of the code is at
http://www.fluffy.co.uk/boxbackup.

Thanks

Dave Bamford.


--------------010200050101000204050304--