From e1c8ec41f8c399a7bf8e1053031a87c700b9b245 Mon Sep 17 00:00:00 2001 From: Dhiru Kholia Date: Sat, 5 Aug 2017 12:27:14 +0530 Subject: [PATCH] Add Peer ID for Folx Based on experiments with Folx version 5.2.1.13690 running on macOS Sierra. Folx uses Azureus-style Peer ID with "-FL" prefix. --- libtransmission/clients-test.c | 3 +++ libtransmission/clients.c | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/libtransmission/clients-test.c b/libtransmission/clients-test.c index 32edde96c..c07ae7fb6 100644 --- a/libtransmission/clients-test.c +++ b/libtransmission/clients-test.c @@ -45,6 +45,9 @@ int main(void) TEST_CLIENT("-FD51W\xFF-", "Free Download Manager 5.1.32"); TEST_CLIENT("-FD51@\xFF-", "Free Download Manager 5.1.x"); /* Negative test case */ + /* Folx */ + TEST_CLIENT("-FL51FF-", "Folx 5.x"); /* Folx v5.2.1.13690 */ + /* gobbledygook */ TEST_CLIENT("-IIO\x10\x2D\x04-", "-IIO%10-%04-"); TEST_CLIENT("-I\05O\x08\x03\x01-", "-I%05O%08%03%01-"); diff --git a/libtransmission/clients.c b/libtransmission/clients.c index 0289ea06e..c7eb8fe40 100644 --- a/libtransmission/clients.c +++ b/libtransmission/clients.c @@ -630,6 +630,10 @@ char* tr_clientForId(char* buf, size_t buflen, void const* id_in) tr_snprintf(buf, buflen, "Free Download Manager %d.%d.x", charint(id[3]), charint(id[4])); } } + else if (strncmp(chid + 1, "FL", 2) == 0) + { + tr_snprintf(buf, buflen, "Folx %d.x", charint(id[3])); + } if (*buf != '\0') {