Totally Objects FTP issue in VA 9

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Totally Objects FTP issue in VA 9

Julian Ford-2
Hello, everyone.

I am using the Totally Objects Socket Set framework in my product,
which has worked fantastically for many years (Thanks, Dave!).

However, I am not able to use the FTP interface in either VA 9.0, or 9.1.1.
(see, Seth?  I said VA....and not VisualAge!)

here is a simple code snippet....

| ftp ftpAddress folderName ftpLocation auditStream resultStream |
auditStream := WriteStream on: String new.
resultStream := WriteStream on: String new.

ftp := TobSocketsFTP statusStream: auditStream.

ftpAddress := TobSocketsFTPAddressPart new
host: (TobSocketsHost hostName: 'www.spinnakerware.com');
username: '[hidden email]';
password: 'aPassword';
account: '';
type: 'I';
path: '';
yourself.

ftp
directoryListing: folderName
address: ftpAddress 
username: ftpAddress username
password: ftpAddress password
account: ftpAddress account
stream: resultStream.

resultStream contents inspect

This works perfectly in 8.6.3, but causes a walkback in 9.

The walkback appears to be related to a change in the SciSocketManager.
In 8.6.3, when I do this....

(SciSocketManager default getHostByName: 'www.spinnakerware.com') addrList first.

I get back a LargeInteger.
But when I do the same thing in 9, I get back a ByteArray.


Now, I fully realize that I am about to be embarrased by what will turn out to be a simple
answer....but I'll take that risk.

Anyone have any thoughts?

Gratefully,
Julian Ford


--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Totally Objects FTP issue in VA 9

Long Haired David
We will have a look at this.
David
Totally Objects

On Sunday, November 18, 2018 at 6:22:32 PM UTC, [hidden email] wrote:
Hello, everyone.

I am using the Totally Objects Socket Set framework in my product,
which has worked fantastically for many years (Thanks, Dave!).

However, I am not able to use the FTP interface in either VA 9.0, or 9.1.1.
(see, Seth?  I said VA....and not VisualAge!)

here is a simple code snippet....

| ftp ftpAddress folderName ftpLocation auditStream resultStream |
auditStream := WriteStream on: String new.
resultStream := WriteStream on: String new.

ftp := TobSocketsFTP statusStream: auditStream.

ftpAddress := TobSocketsFTPAddressPart new
host: (TobSocketsHost hostName: '<a href="http://www.spinnakerware.com" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.spinnakerware.com\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHy_HPW_iWOc8TRQFeIaS86OMajiw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.spinnakerware.com\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHy_HPW_iWOc8TRQFeIaS86OMajiw&#39;;return true;">www.spinnakerware.com');
username: '<a href="javascript:" target="_blank" gdf-obfuscated-mailto="OR1_RbJWBgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">aU...@...';
password: 'aPassword';
account: '';
type: 'I';
path: '';
yourself.

ftp
directoryListing: folderName
address: ftpAddress 
username: ftpAddress username
password: ftpAddress password
account: ftpAddress account
stream: resultStream.

resultStream contents inspect

This works perfectly in 8.6.3, but causes a walkback in 9.

The walkback appears to be related to a change in the SciSocketManager.
In 8.6.3, when I do this....

(SciSocketManager default getHostByName: '<a href="http://www.spinnakerware.com" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.spinnakerware.com\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHy_HPW_iWOc8TRQFeIaS86OMajiw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.spinnakerware.com\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHy_HPW_iWOc8TRQFeIaS86OMajiw&#39;;return true;">www.spinnakerware.com') addrList first.

I get back a LargeInteger.
But when I do the same thing in 9, I get back a ByteArray.


Now, I fully realize that I am about to be embarrased by what will turn out to be a simple
answer....but I'll take that risk.

Anyone have any thoughts?

Gratefully,
Julian Ford


--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
David
Totally Objects
Doing Smalltalk since 1989
Reply | Threaded
Open this post in threaded view
|

Re: Totally Objects FTP issue in VA 9

Seth Berman
I believe it’s this issue when IPV6 came into the product.
The following is a link to the migration guide entry.
https://www.instantiations.com/docs/90/wwhelp/wwhimpl/js/html/wwhelp.htm#href=mi/migr8621.html

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Totally Objects FTP issue in VA 9

Long Haired David
In reply to this post by Julian Ford-2
Hi Julian. I had this problem on moving to 9..1 with some code I had sending e-mails. The following is an extract from an e-mail I had from my co-Totally Objects partner. Let me know how you get on:.

"I've taken a look.  It is not a missing method - just some different behaviour.  There is a method in one of the VAST socket classes that usually returns an array of 32bit numbers.  These numbers represent the different IP addresses of the computer.  My method takes the first of these (if there is one) and breaks it into bytes and then contrusts a ByteArray with four elements.

When you use this method it looks like you are getting an array of already construsted ByteArrays.  I'm guessing that the VAST socket library has been changed.  For backwards compatibility I suggest that you change these two methods in String in the sockets library.

tobSocketsAsAddressByteArray

| sciHostEnt addrList addr |

(sciHostEnt := SciSocketManager default getHostByName: self) isSciError ifTrue: [^ #[255 255 255 255]].

(addrList := sciHostEnt addrList) isEmpty ifTrue: [^ #[255 255 255 255]].

addr := addrList first.

addr class == ByteArray ifTrue: [^ addr]

^ (ByteArray new: 4)
hton32At:  0 put: addr;
yourself

-----------------

tobSocketsAsAddressByteArrays

| sciHostEnt array addrList |

(sciHostEnt := SciSocketManager default getHostByName: self) isSciError ifTrue: [^#()].

(addrList := sciHostEnt addrList) isEmpty ifTrue: [#()].

array := Array new: addrList size.
addrList doWithIndex: [:addr :index |
addr class == ByteArray
ifTrue: [
array at: index put: addr
] ifFalse: [
array
at: index
put: (
(ByteArray new: 4)
hton32At:  0 put: addr;
yourself
)
]
].

^ array

On Sunday, November 18, 2018 at 6:22:32 PM UTC, [hidden email] wrote:
Hello, everyone.

I am using the Totally Objects Socket Set framework in my product,
which has worked fantastically for many years (Thanks, Dave!).

However, I am not able to use the FTP interface in either VA 9.0, or 9.1.1.
(see, Seth?  I said VA....and not VisualAge!)

here is a simple code snippet....

| ftp ftpAddress folderName ftpLocation auditStream resultStream |
auditStream := WriteStream on: String new.
resultStream := WriteStream on: String new.

ftp := TobSocketsFTP statusStream: auditStream.

ftpAddress := TobSocketsFTPAddressPart new
host: (TobSocketsHost hostName: '<a href="http://www.spinnakerware.com" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.spinnakerware.com\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHy_HPW_iWOc8TRQFeIaS86OMajiw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.spinnakerware.com\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHy_HPW_iWOc8TRQFeIaS86OMajiw&#39;;return true;">www.spinnakerware.com');
username: '<a href="javascript:" target="_blank" gdf-obfuscated-mailto="OR1_RbJWBgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">aU...@...';
password: 'aPassword';
account: '';
type: 'I';
path: '';
yourself.

ftp
directoryListing: folderName
address: ftpAddress 
username: ftpAddress username
password: ftpAddress password
account: ftpAddress account
stream: resultStream.

resultStream contents inspect

This works perfectly in 8.6.3, but causes a walkback in 9.

The walkback appears to be related to a change in the SciSocketManager.
In 8.6.3, when I do this....

(SciSocketManager default getHostByName: '<a href="http://www.spinnakerware.com" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.spinnakerware.com\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHy_HPW_iWOc8TRQFeIaS86OMajiw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.spinnakerware.com\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHy_HPW_iWOc8TRQFeIaS86OMajiw&#39;;return true;">www.spinnakerware.com') addrList first.

I get back a LargeInteger.
But when I do the same thing in 9, I get back a ByteArray.


Now, I fully realize that I am about to be embarrased by what will turn out to be a simple
answer....but I'll take that risk.

Anyone have any thoughts?

Gratefully,
Julian Ford


--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
David
Totally Objects
Doing Smalltalk since 1989
Reply | Threaded
Open this post in threaded view
|

Re: Totally Objects FTP issue in VA 9

Julian Ford-2
Hello, David....thanks for the reply.

After Seth's post (THANKS, SETH!!!), I found that same method, and made a similar change.
It still did not work.

I have now found a second change that was required....this is my new version:

fromSciAddress: aSciAddress

^self
host: (TobSocketsHost byteArray: aSciAddress address)
portNumber: (aSciAddress port)


It seems to work now....will do more testing, but am hopefully fine now.

Thanks again...

Regards,
Julian



On Monday, November 19, 2018 at 5:13:42 AM UTC-5, Totally Objects wrote:
Hi Julian. I had this problem on moving to 9..1 with some code I had sending e-mails. The following is an extract from an e-mail I had from my co-Totally Objects partner. Let me know how you get on:.

"I've taken a look.  It is not a missing method - just some different behaviour.  There is a method in one of the VAST socket classes that usually returns an array of 32bit numbers.  These numbers represent the different IP addresses of the computer.  My method takes the first of these (if there is one) and breaks it into bytes and then contrusts a ByteArray with four elements.

When you use this method it looks like you are getting an array of already construsted ByteArrays.  I'm guessing that the VAST socket library has been changed.  For backwards compatibility I suggest that you change these two methods in String in the sockets library.

tobSocketsAsAddressByteArray

| sciHostEnt addrList addr |

(sciHostEnt := SciSocketManager default getHostByName: self) isSciError ifTrue: [^ #[255 255 255 255]].

(addrList := sciHostEnt addrList) isEmpty ifTrue: [^ #[255 255 255 255]].

addr := addrList first.

addr class == ByteArray ifTrue: [^ addr]

^ (ByteArray new: 4)
hton32At:  0 put: addr;
yourself

-----------------

tobSocketsAsAddressByteArrays

| sciHostEnt array addrList |

(sciHostEnt := SciSocketManager default getHostByName: self) isSciError ifTrue: [^#()].

(addrList := sciHostEnt addrList) isEmpty ifTrue: [#()].

array := Array new: addrList size.
addrList doWithIndex: [:addr :index |
addr class == ByteArray
ifTrue: [
array at: index put: addr
] ifFalse: [
array
at: index
put: (
(ByteArray new: 4)
hton32At:  0 put: addr;
yourself
)
]
].

^ array

On Sunday, November 18, 2018 at 6:22:32 PM UTC, [hidden email] wrote:
Hello, everyone.

I am using the Totally Objects Socket Set framework in my product,
which has worked fantastically for many years (Thanks, Dave!).

However, I am not able to use the FTP interface in either VA 9.0, or 9.1.1.
(see, Seth?  I said VA....and not VisualAge!)

here is a simple code snippet....

| ftp ftpAddress folderName ftpLocation auditStream resultStream |
auditStream := WriteStream on: String new.
resultStream := WriteStream on: String new.

ftp := TobSocketsFTP statusStream: auditStream.

ftpAddress := TobSocketsFTPAddressPart new
host: (TobSocketsHost hostName: '<a href="http://www.spinnakerware.com" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.spinnakerware.com\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHy_HPW_iWOc8TRQFeIaS86OMajiw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.spinnakerware.com\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHy_HPW_iWOc8TRQFeIaS86OMajiw&#39;;return true;">www.spinnakerware.com');
username: '[hidden email]';
password: 'aPassword';
account: '';
type: 'I';
path: '';
yourself.

ftp
directoryListing: folderName
address: ftpAddress 
username: ftpAddress username
password: ftpAddress password
account: ftpAddress account
stream: resultStream.

resultStream contents inspect

This works perfectly in 8.6.3, but causes a walkback in 9.

The walkback appears to be related to a change in the SciSocketManager.
In 8.6.3, when I do this....

(SciSocketManager default getHostByName: '<a href="http://www.spinnakerware.com" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.spinnakerware.com\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHy_HPW_iWOc8TRQFeIaS86OMajiw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.spinnakerware.com\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHy_HPW_iWOc8TRQFeIaS86OMajiw&#39;;return true;">www.spinnakerware.com') addrList first.

I get back a LargeInteger.
But when I do the same thing in 9, I get back a ByteArray.


Now, I fully realize that I am about to be embarrased by what will turn out to be a simple
answer....but I'll take that risk.

Anyone have any thoughts?

Gratefully,
Julian Ford


--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.