Commit 838ec57b authored by Bernd Paysan's avatar Bernd Paysan

Exchange hostnames

parent 708f2a22
......@@ -17,7 +17,6 @@
Forward >invitations
in net2o Forward dispose-addrs
in net2o Forward exchange-hostnames
Forward mynick$
Forward invite-me
Forward qr-invite-me
......@@ -232,7 +231,6 @@ Sema id-sema
update-key all-ivs ;
: reply-key ( -- ) crypt( ." Reply key: " tmpkey@ .nnb forth:cr )
reply-key, ( cookie+request ) time-offset! context
\ o IF net2o:exchange-hostnames THEN
]tmpnest
push-cmd ;
......@@ -291,9 +289,6 @@ Sema id-sema
+net2o: get-host ( -- )
host$ $@ $, set-host ;
' invite-result is <invite-result>
in net2o : exchange-hostnames ( -- )
host$ $@ $, set-host ;
}scope
setup-table $save
......
......@@ -605,7 +605,8 @@ previous
nest[ cookie, gen-reply request, ]nest other
tmpkey-request
ind-addr @ IF punch? THEN
req-codesize req-datasize map-request, close-tmpnest
req-codesize req-datasize map-request,
get-host push' get-host close-tmpnest
['] push-cmd IS expect-reply?
end-code ;
......
......@@ -532,7 +532,7 @@ in net2o : new-code ( addrs addrd u -- )
addrd >dest-map @ ?EXIT
net2o:new-context >o rdrop setup! THEN
msg( ." code map: " addrs x64. ." own: " addrd x64. u hex. cr )
$remote-host $@ remote-host$ $!
$remote-host @ IF $remote-host $@ remote-host$ $! $remote-host $free THEN
>code-flag on
addrd u addr code-rmap map-code-dest
addrs u map-source to code-map ;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment