Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CCL] Translate host to hostname #6

Merged
merged 1 commit into from Jul 20, 2015

Conversation

rudolfochrist
Copy link
Contributor

Hi,

the other day I was playing with cl-redis on CCL 1.10. I ran into the bug, that sockets cannot be created in CCL with vector quad hosts.

Steps to reproduce this bug:

  1. Load usocket into your CCL image (obviously)
  2. Run
CL-USER> (usocket:socket-connect #(127 0 0 1) 6379) ; default Redis host and port

This presents me:

The value #(127 0 0 1) is not of the expected type (OR
                                                    INTEGER
                                                    STRING).
   [Condition of type TYPE-ERROR]

Restarts:
 0: [RETRY] Retry SLIME REPL evaluation request.
 1: [*ABORT] Return to SLIME's top level.
 2: [ABORT-BREAK] Reset this thread
 3: [ABORT] Kill this thread

Backtrace:
  0: (CCL::HOST-AS-INET-HOST #(127 0 0 1))
  1: (CCL::MAKE-TCP-STREAM-SOCKET 27 :REMOTE-HOST #(127 0 0 1) :REMOTE-PORT 6379 :LOCAL-HOST NIL :LOCAL-PORT NIL :FORMAT :TEXT :EXTERNAL-FORMAT :UNIX :DEADLINE NIL :NODELAY NIL :CONNECT-TIMEOUT NIL)
  2: (CCL::MAKE-TCP-SOCKET :REMOTE-HOST #(127 0 0 1) :REMOTE-PORT 6379 :LOCAL-HOST NIL :LOCAL-PORT NIL :FORMAT :TEXT :EXTERNAL-FORMAT :UNIX :DEADLINE NIL :NODELAY NIL :CONNECT-TIMEOUT NIL)
  3: (MAKE-SOCKET :REMOTE-HOST #(127 0 0 1) :REMOTE-PORT 6379 :LOCAL-HOST NIL :LOCAL-PORT NIL :FORMAT :TEXT :EXTERNAL-FORMAT :UNIX :DEADLINE NIL :NODELAY NIL :CONNECT-TIMEOUT NIL)
  4: (USOCKET:SOCKET-CONNECT #(127 0 0 1) 6379 :PROTOCOL :STREAM :ELEMENT-TYPE NIL :TIMEOUT NIL :DEADLINE NIL :NODELAY NIL :LOCAL-HOST NIL :LOCAL-PORT NIL)
  5: (CCL::CALL-CHECK-REGS USOCKET:SOCKET-CONNECT #(127 0 0 1) 6379)
  6: (CCL::CHEAP-EVAL (USOCKET:SOCKET-CONNECT #(127 0 0 1) 6379))
 --more--

This PR aims to fix it by explicitly translating the host in to its hostname.

Best (and keep up the good work),

Sebastian

CCL needs the host as string or integer. It breaks for e.g. vector quad
binghe added a commit that referenced this pull request Jul 20, 2015
@binghe binghe merged commit 2a48aeb into usocket:master Jul 20, 2015
@binghe
Copy link
Member

binghe commented Jul 20, 2015

Thanks, and sorry for merging it late.

@rudolfochrist rudolfochrist deleted the ccl-vector-quad-host branch July 20, 2015 19:04
@rudolfochrist
Copy link
Contributor Author

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants