-
-
Notifications
You must be signed in to change notification settings - Fork 320
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
Passive DCC #2004
Passive DCC #2004
Conversation
This makes it easier to handle the optional "token" argument at the (right) end, which will be necessary to support passive DCC. Incidentally, this is RtL parsing order is the reason why you'd get a cryptic "0" address error when attempting to do passive DCC: the "token" argument gets misinterpreted as the "size" argument. Every argument "shifts" over by one, leaving an address (port) of "0".
Before making any significant changes, let's identify the existing xfer types by either active or passive.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The token
is never set by WeeChat itself so if I understand WeeChat only supports passive DCC as a "receiver".
The help on command /dcc
(ie /help dcc
) should maybe mention passive DCC being supported.
Besides, the unit tests are failing, because some network address resolution seems to be made and causes a test to fail.
Correct.
I'll address these. |
How can I test this passive DCC, which client and/or IRC server are you using? |
You'll need a public IP address and to expose a port—I tested with IPv4. Then, join As for the clients, I've tested with irssi and Weechat. |
@flashcode, can you please point me to the file that contains the help docs ( |
|
Codecov Report
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. @@ Coverage Diff @@
## master #2004 +/- ##
==========================================
+ Coverage 47.10% 47.22% +0.11%
==========================================
Files 216 216
Lines 91314 91774 +460
==========================================
+ Hits 43017 43342 +325
- Misses 48297 48432 +135
... and 1 file with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
This commit also includes support for passive DCC RESUME. There was also a potential segfault with calling `atoi(pos_token)` when `pos_token` is NULL, so `token` is set to be stored as a string. Although it is an integer, we don't need to store it as such. That's really more of an implementation detail.
44dbace
to
46d0601
Compare
@flashcode, can you try running the test suite again? It should pass now. |
@flashcode, have you been able to test this PR? |
I'll test it soon, in the next days. |
Merged, thanks for adding this new feature! |
Hi @mario-campos, For your information, this PR introduced a regression with DCC chat, causing a crash when you do I fixed the issue in this commit e62ff28 and you could look if my changes are OK for you. |
Sorry about introducing that regression. I retested the passive DCC functionality against the HEAD of master (f49810e) and it still works. Thanks! |
how should the port range be written in xfer.conf? will a dash work? or does it use a colon
|
@ksurl: it's a dash, see
|
This PR adds initial support for passive DCC. Specifically, it supports a non-WeeChat client sending
DCC SEND
with a port of 0, which causes weechat to open a listening socket, accept the first client that connects, and start a new xfer.xfer.network.own_ip
config property.xfer.network.port_range
config property.Closes #487.