synk, branch HEAD synchronize files between hosts 3349544b57211c18f3a54bfa4d48b2065f260a19 2019-07-01T09:10:15Z 2019-07-01T09:10:15Z Update contact information Willy Goiffon dev@z3bra.org commit 3349544b57211c18f3a54bfa4d48b2065f260a19 parent 7e7eb4e731666891586edb57108c00f4c456bb80 Author: Willy Goiffon <dev@z3bra.org> Date: Mon, 1 Jul 2019 11:10:15 +0200 Update contact information 7e7eb4e731666891586edb57108c00f4c456bb80 2017-07-20T06:24:19Z 2017-07-20T06:24:19Z Bump version 1.1 z3bra contactatz3bradotorg commit 7e7eb4e731666891586edb57108c00f4c456bb80 parent f664728af377b54b993801c61a4ad8212b8ed812 Author: z3bra <contactatz3bradotorg> Date: Thu, 20 Jul 2017 08:24:19 +0200 Bump version 1.1 f664728af377b54b993801c61a4ad8212b8ed812 2017-06-08T06:12:10Z 2017-06-08T06:12:10Z Add makefile to build the software z3bra contactatz3bradotorg commit f664728af377b54b993801c61a4ad8212b8ed812 parent 4694eb9f62d7532d313a3a8d5dc01d524efdd04e Author: z3bra <contactatz3bradotorg> Date: Thu, 8 Jun 2017 08:12:10 +0200 Add makefile to build the software 4694eb9f62d7532d313a3a8d5dc01d524efdd04e 2017-06-08T06:11:51Z 2017-06-08T06:11:51Z Update README for better clarity z3bra contactatz3bradotorg commit 4694eb9f62d7532d313a3a8d5dc01d524efdd04e parent 66edfe5193f6f9d3d8650544c7dad52a752c68a4 Author: z3bra <contactatz3bradotorg> Date: Thu, 8 Jun 2017 08:11:51 +0200 Update README for better clarity 66edfe5193f6f9d3d8650544c7dad52a752c68a4 2017-06-08T06:06:29Z 2017-06-08T06:06:29Z Add missing netinet/in.h header z3bra contactatz3bradotorg commit 66edfe5193f6f9d3d8650544c7dad52a752c68a4 parent 2caf25119d8f52f1c4b13b0bbbf039569754c578 Author: z3bra <contactatz3bradotorg> Date: Thu, 8 Jun 2017 08:06:29 +0200 Add missing netinet/in.h header 2caf25119d8f52f1c4b13b0bbbf039569754c578 2017-06-06T06:32:46Z 2017-06-06T06:32:46Z Rename variables to match naming convention z3bra contactatz3bradotorg commit 2caf25119d8f52f1c4b13b0bbbf039569754c578 parent 6db93742576edd6cd9b99fda1c85c492f8944acc Author: z3bra <contactatz3bradotorg> Date: Tue, 6 Jun 2017 08:32:46 +0200 Rename variables to match naming convention 6db93742576edd6cd9b99fda1c85c492f8944acc 2017-06-06T06:30:14Z 2017-06-06T06:30:14Z Make argument type more specific z3bra contactatz3bradotorg commit 6db93742576edd6cd9b99fda1c85c492f8944acc parent ba4d659fcb168165b34f165dd480b8b7b2187f56 Author: z3bra <contactatz3bradotorg> Date: Tue, 6 Jun 2017 08:30:14 +0200 Make argument type more specific Real reason is that gcc 6.x doesn't recognize "char * []" as a "complete type", and I don't like warnings... Screw you, GNU! ba4d659fcb168165b34f165dd480b8b7b2187f56 2017-06-06T06:29:37Z 2017-06-06T06:29:37Z Rearrange headers order z3bra contactatz3bradotorg commit ba4d659fcb168165b34f165dd480b8b7b2187f56 parent 05c2017d3f988551b0cfe535424a8ff713b6cd31 Author: z3bra <contactatz3bradotorg> Date: Tue, 6 Jun 2017 08:29:37 +0200 Rearrange headers order 05c2017d3f988551b0cfe535424a8ff713b6cd31 2016-09-12T11:40:55Z 2016-09-12T11:40:55Z Bump version 1.0 z3bra willyatmailoodotorg commit 05c2017d3f988551b0cfe535424a8ff713b6cd31 parent aa9ebd6d6195dad020c1e2ff124a955b62e120b2 Author: z3bra <willyatmailoodotorg> Date: Mon, 12 Sep 2016 13:40:55 +0200 Bump version 1.0 aa9ebd6d6195dad020c1e2ff124a955b62e120b2 2016-09-09T11:28:55Z 2016-09-09T11:28:55Z Wait for the client to close the connection z3bra willyatmailoodotorg commit aa9ebd6d6195dad020c1e2ff124a955b62e120b2 parent a1da0e4995ec90f1913f3680543dc0f3c86c524c Author: z3bra <willyatmailoodotorg> Date: Fri, 9 Sep 2016 13:28:55 +0200 Wait for the client to close the connection a1da0e4995ec90f1913f3680543dc0f3c86c524c 2016-09-09T06:31:47Z 2016-09-09T06:31:47Z Use _POSIX_PATH_MAX instead of PATH_MAX Willy willyatmailoodotorg commit a1da0e4995ec90f1913f3680543dc0f3c86c524c parent 8b8a17a79f10982e0c838b3dff5c91aef3fe936c Author: Willy <willyatmailoodotorg> Date: Fri, 9 Sep 2016 08:31:47 +0200 Use _POSIX_PATH_MAX instead of PATH_MAX 8b8a17a79f10982e0c838b3dff5c91aef3fe936c 2016-09-09T06:04:15Z 2016-09-09T06:04:15Z Parse config in client mode only Willy willyatmailoodotorg commit 8b8a17a79f10982e0c838b3dff5c91aef3fe936c parent a456dce1c91772af689a17850b8224705bd34719 Author: Willy <willyatmailoodotorg> Date: Fri, 9 Sep 2016 08:04:15 +0200 Parse config in client mode only a456dce1c91772af689a17850b8224705bd34719 2016-09-08T16:07:35Z 2016-09-08T16:07:35Z Update mkfile to install manpages Willy willyatmailoodotorg commit a456dce1c91772af689a17850b8224705bd34719 parent 85d4dbcb1860db1aadc119514f93cd8930300e64 Author: Willy <willyatmailoodotorg> Date: Thu, 8 Sep 2016 18:07:35 +0200 Update mkfile to install manpages 85d4dbcb1860db1aadc119514f93cd8930300e64 2016-09-08T16:03:06Z 2016-09-08T16:03:24Z Add manpage for the synk.conf(5) file Willy willyatmailoodotorg commit 85d4dbcb1860db1aadc119514f93cd8930300e64 parent 462ae7788c98eb609661e919418ca0bb55b358fa Author: Willy <willyatmailoodotorg> Date: Thu, 8 Sep 2016 18:03:06 +0200 Add manpage for the synk.conf(5) file 462ae7788c98eb609661e919418ca0bb55b358fa 2016-09-08T12:22:47Z 2016-09-08T12:22:52Z Add manpage for the synk(1) command Willy willyatmailoodotorg commit 462ae7788c98eb609661e919418ca0bb55b358fa parent aa93f8110afe112cdb55cf72b6245b576ebdbc08 Author: Willy <willyatmailoodotorg> Date: Thu, 8 Sep 2016 14:22:47 +0200 Add manpage for the synk(1) command aa93f8110afe112cdb55cf72b6245b576ebdbc08 2016-09-08T12:19:48Z 2016-09-08T12:19:48Z Pass the -p flag in server mode Willy willyatmailoodotorg commit aa93f8110afe112cdb55cf72b6245b576ebdbc08 parent 7db446f73d41673b6503f5a58c50147d77e903ef Author: Willy <willyatmailoodotorg> Date: Thu, 8 Sep 2016 14:19:48 +0200 Pass the -p flag in server mode 7db446f73d41673b6503f5a58c50147d77e903ef 2016-09-08T06:21:45Z 2016-09-08T06:21:45Z HOST arg is optionnal Willy willyatmailoodotorg commit 7db446f73d41673b6503f5a58c50147d77e903ef parent b28a530c497502283f0fd988dd5f781cce78c967 Author: Willy <willyatmailoodotorg> Date: Thu, 8 Sep 2016 08:21:45 +0200 HOST arg is optionnal b28a530c497502283f0fd988dd5f781cce78c967 2016-09-07T12:37:45Z 2016-09-07T12:37:45Z Add debug informations Willy willyatmailoodotorg commit b28a530c497502283f0fd988dd5f781cce78c967 parent 408ba38ec5c0c74adec071d58f3219471cedfb70 Author: Willy <willyatmailoodotorg> Date: Wed, 7 Sep 2016 14:37:45 +0200 Add debug informations 408ba38ec5c0c74adec071d58f3219471cedfb70 2016-09-07T12:09:07Z 2016-09-07T12:09:07Z Merge branch 'loadconf' Willy willyatmailoodotorg commit 408ba38ec5c0c74adec071d58f3219471cedfb70 parent 737370d683dbd0e04feae39f454169158a27091b Author: Willy <willyatmailoodotorg> Date: Wed, 7 Sep 2016 14:09:07 +0200 Merge branch 'loadconf' 737370d683dbd0e04feae39f454169158a27091b 2016-09-07T12:07:20Z 2016-09-07T12:07:20Z Remove log level LOG_ERROR Willy willyatmailoodotorg commit 737370d683dbd0e04feae39f454169158a27091b parent 1ee2824f8112b6ad79b95c811f8f8d3ed98f701f Author: Willy <willyatmailoodotorg> Date: Wed, 7 Sep 2016 14:07:20 +0200 Remove log level LOG_ERROR 81eb0c58c25c896c7629b32d80897fb1e7b1ebf7 2016-09-07T12:01:11Z 2016-09-07T12:01:11Z Define config file format in README Willy willyatmailoodotorg commit 81eb0c58c25c896c7629b32d80897fb1e7b1ebf7 parent ee0f6f75bd5de8de145fda094c6aef938732c6b9 Author: Willy <willyatmailoodotorg> Date: Wed, 7 Sep 2016 14:01:11 +0200 Define config file format in README ee0f6f75bd5de8de145fda094c6aef938732c6b9 2016-09-07T11:44:12Z 2016-09-07T11:44:17Z Cleanup header files Willy willyatmailoodotorg commit ee0f6f75bd5de8de145fda094c6aef938732c6b9 parent b3f644e436534e648650db11022bd575defe56f9 Author: Willy <willyatmailoodotorg> Date: Wed, 7 Sep 2016 13:44:12 +0200 Cleanup header files b3f644e436534e648650db11022bd575defe56f9 2016-09-07T10:55:10Z 2016-09-07T10:55:10Z Use yacc(1) to parse config file Willy willyatmailoodotorg commit b3f644e436534e648650db11022bd575defe56f9 parent 11db759707a8de9f5dc0686083d679d16a756555 Author: Willy <willyatmailoodotorg> Date: Wed, 7 Sep 2016 12:55:10 +0200 Use yacc(1) to parse config file 11db759707a8de9f5dc0686083d679d16a756555 2016-09-07T10:53:53Z 2016-09-07T10:54:35Z Move global declarations to synk.h Willy willyatmailoodotorg commit 11db759707a8de9f5dc0686083d679d16a756555 parent 2634aec4e642158dd6970891129b9fa8f7e0e81e Author: Willy <willyatmailoodotorg> Date: Wed, 7 Sep 2016 12:53:53 +0200 Move global declarations to synk.h 2634aec4e642158dd6970891129b9fa8f7e0e81e 2016-09-06T22:45:56Z 2016-09-06T22:45:56Z Rename default macros Willy willyatmailoodotorg commit 2634aec4e642158dd6970891129b9fa8f7e0e81e parent f6019ad0e9d48e70fa1f065b4dec323841a8c4a7 Author: Willy <willyatmailoodotorg> Date: Wed, 7 Sep 2016 00:45:56 +0200 Rename default macros f6019ad0e9d48e70fa1f065b4dec323841a8c4a7 2016-09-06T16:54:20Z 2016-09-06T16:54:20Z New flag to specify config path Willy willyatmailoodotorg commit f6019ad0e9d48e70fa1f065b4dec323841a8c4a7 parent 43a97e482b12a092bc8b38ea684e4ffa9f984e3a Author: Willy <willyatmailoodotorg> Date: Tue, 6 Sep 2016 18:54:20 +0200 New flag to specify config path 43a97e482b12a092bc8b38ea684e4ffa9f984e3a 2016-09-06T16:46:48Z 2016-09-06T16:46:48Z Ability to load peers from a file Willy willyatmailoodotorg commit 43a97e482b12a092bc8b38ea684e4ffa9f984e3a parent 1ee2824f8112b6ad79b95c811f8f8d3ed98f701f Author: Willy <willyatmailoodotorg> Date: Tue, 6 Sep 2016 18:46:48 +0200 Ability to load peers from a file 1ee2824f8112b6ad79b95c811f8f8d3ed98f701f 2016-09-06T11:42:08Z 2016-09-06T11:42:08Z Update README to reflect current program state Willy willyatmailoodotorg commit 1ee2824f8112b6ad79b95c811f8f8d3ed98f701f parent ae6498b42f302ea8e5287d13efc8c0508bdef941 Author: Willy <willyatmailoodotorg> Date: Tue, 6 Sep 2016 13:42:08 +0200 Update README to reflect current program state ae6498b42f302ea8e5287d13efc8c0508bdef941 2016-09-06T11:41:49Z 2016-09-06T11:41:49Z Slight change to a debug log Willy willyatmailoodotorg commit ae6498b42f302ea8e5287d13efc8c0508bdef941 parent 91e24d608a0bc1f2f875cc61a1471724471b064a Author: Willy <willyatmailoodotorg> Date: Tue, 6 Sep 2016 13:41:49 +0200 Slight change to a debug log 91e24d608a0bc1f2f875cc61a1471724471b064a 2016-09-06T11:37:33Z 2016-09-06T11:37:33Z Don't flush the peer list between synchronisations Willy willyatmailoodotorg commit 91e24d608a0bc1f2f875cc61a1471724471b064a parent 0f59adb46300524c2901a4a11c4a96f493413bbc Author: Willy <willyatmailoodotorg> Date: Tue, 6 Sep 2016 13:37:33 +0200 Don't flush the peer list between synchronisations localhost is added to the peer list at the start of the program. For each file to sync, the peer list is reused. It will be flushed after all args have been processed. This commit also fixes a small "bug" where 'syncfile()' doesn't wait for all its chilren to return. This means we won't sync the next file until the current one isn't finished synchronising. Not sure wether or not this is a good thing, but at least the logs appear in the "natural" order now. 0f59adb46300524c2901a4a11c4a96f493413bbc 2016-09-06T10:16:23Z 2016-09-06T10:16:23Z Handle files smaller than 127 bytes Willy willyatmailoodotorg commit 0f59adb46300524c2901a4a11c4a96f493413bbc parent 6dc505684ce6858d82889b8c487b768daaa3533d Author: Willy <willyatmailoodotorg> Date: Tue, 6 Sep 2016 12:16:23 +0200 Handle files smaller than 127 bytes 6dc505684ce6858d82889b8c487b768daaa3533d 2016-09-06T06:46:01Z 2016-09-06T06:46:01Z Peer localhost data with other peers Willy willyatmailoodotorg commit 6dc505684ce6858d82889b8c487b768daaa3533d parent 6ea0770423ed8bc445f150d43a6e18beeeb9bb25 Author: Willy <willyatmailoodotorg> Date: Tue, 6 Sep 2016 08:46:01 +0200 Peer localhost data with other peers 6ea0770423ed8bc445f150d43a6e18beeeb9bb25 2016-09-06T06:35:02Z 2016-09-06T06:35:02Z Update log messages Willy willyatmailoodotorg commit 6ea0770423ed8bc445f150d43a6e18beeeb9bb25 parent 2481dadd4fb2e8b42866d81fa5ae5c600121f021 Author: Willy <willyatmailoodotorg> Date: Tue, 6 Sep 2016 08:35:02 +0200 Update log messages 2481dadd4fb2e8b42866d81fa5ae5c600121f021 2016-09-06T06:34:18Z 2016-09-06T06:34:18Z Lower sha512 buffer size Willy willyatmailoodotorg commit 2481dadd4fb2e8b42866d81fa5ae5c600121f021 parent 10e495a116df71afd7de3190ad207955889b010b Author: Willy <willyatmailoodotorg> Date: Tue, 6 Sep 2016 08:34:18 +0200 Lower sha512 buffer size 10e495a116df71afd7de3190ad207955889b010b 2016-09-04T21:18:13Z 2016-09-04T21:18:13Z Fix comparison and add logs Willy willyatmailoodotorg commit 10e495a116df71afd7de3190ad207955889b010b parent bc9d67414e3bc01b83f7a6b054397fa3e2ee986e Author: Willy <willyatmailoodotorg> Date: Sun, 4 Sep 2016 23:18:13 +0200 Fix comparison and add logs bc9d67414e3bc01b83f7a6b054397fa3e2ee986e 2016-09-04T08:32:23Z 2016-09-04T08:32:23Z Rearrange function declaration Willy willyatmailoodotorg commit bc9d67414e3bc01b83f7a6b054397fa3e2ee986e parent a5fa976251072410375f2466833bef081e496846 Author: Willy <willyatmailoodotorg> Date: Sun, 4 Sep 2016 10:32:23 +0200 Rearrange function declaration a5fa976251072410375f2466833bef081e496846 2016-09-03T22:55:17Z 2016-09-03T22:55:17Z Wait for child processes before returning Willy willyatmailoodotorg commit a5fa976251072410375f2466833bef081e496846 parent 9453df688994798aebaffc745559c95dd492ebba Author: Willy <willyatmailoodotorg> Date: Sun, 4 Sep 2016 00:55:17 +0200 Wait for child processes before returning 9453df688994798aebaffc745559c95dd492ebba 2016-09-03T22:03:58Z 2016-09-03T22:04:03Z Rely on remote synk(1) being in the PATH Willy willyatmailoodotorg commit 9453df688994798aebaffc745559c95dd492ebba parent ae21e085a572875e7e01381047853252d65ac663 Author: Willy <willyatmailoodotorg> Date: Sun, 4 Sep 2016 00:03:58 +0200 Rely on remote synk(1) being in the PATH ae21e085a572875e7e01381047853252d65ac663 2016-09-03T21:59:55Z 2016-09-03T21:59:55Z Add a -q(uiet) mode to kill error messages Willy willyatmailoodotorg commit ae21e085a572875e7e01381047853252d65ac663 parent e872191ae4694a75d961467620784755eae1d160 Author: Willy <willyatmailoodotorg> Date: Sat, 3 Sep 2016 23:59:55 +0200 Add a -q(uiet) mode to kill error messages e872191ae4694a75d961467620784755eae1d160 2016-09-03T21:57:31Z 2016-09-03T21:57:31Z Don't fail if a file doesn't exists Willy willyatmailoodotorg commit e872191ae4694a75d961467620784755eae1d160 parent 40270e60f6416f066c74fede12926f41b43b6070 Author: Willy <willyatmailoodotorg> Date: Sat, 3 Sep 2016 23:57:31 +0200 Don't fail if a file doesn't exists 40270e60f6416f066c74fede12926f41b43b6070 2016-09-03T21:53:59Z 2016-09-03T21:53:59Z Convert perror() calls to log(LOG_ERROR, ..) Willy willyatmailoodotorg commit 40270e60f6416f066c74fede12926f41b43b6070 parent 63b3591f24ae303a61fd0c0be9f4bef8a4e98a24 Author: Willy <willyatmailoodotorg> Date: Sat, 3 Sep 2016 23:53:59 +0200 Convert perror() calls to log(LOG_ERROR, ..) 63b3591f24ae303a61fd0c0be9f4bef8a4e98a24 2016-09-03T21:46:08Z 2016-09-03T21:46:08Z Actually run the rsync command generated Willy willyatmailoodotorg commit 63b3591f24ae303a61fd0c0be9f4bef8a4e98a24 parent 9aeb4bdc5ffb6c15f8ac96fadb3da1daa32e3c0e Author: Willy <willyatmailoodotorg> Date: Sat, 3 Sep 2016 23:46:08 +0200 Actually run the rsync command generated 9aeb4bdc5ffb6c15f8ac96fadb3da1daa32e3c0e 2016-09-03T21:45:18Z 2016-09-03T21:45:18Z Set verbosity to LOG_ERROR by default Willy willyatmailoodotorg commit 9aeb4bdc5ffb6c15f8ac96fadb3da1daa32e3c0e parent 5634711a7f8b6ef5b1d2d011697c21f3d4223b84 Author: Willy <willyatmailoodotorg> Date: Sat, 3 Sep 2016 23:45:18 +0200 Set verbosity to LOG_ERROR by default 5634711a7f8b6ef5b1d2d011697c21f3d4223b84 2016-09-03T21:36:20Z 2016-09-03T21:36:20Z Make the client reconnect RETRY times Willy willyatmailoodotorg commit 5634711a7f8b6ef5b1d2d011697c21f3d4223b84 parent cc46dfd595f112a68c17b7d01be792228e506aec Author: Willy <willyatmailoodotorg> Date: Sat, 3 Sep 2016 23:36:20 +0200 Make the client reconnect RETRY times cc46dfd595f112a68c17b7d01be792228e506aec 2016-09-03T21:34:46Z 2016-09-03T21:34:46Z Use SIGALRM to make the server timeout Willy willyatmailoodotorg commit cc46dfd595f112a68c17b7d01be792228e506aec parent 06e9c0735e637b1caf7bc32415880039e303f488 Author: Willy <willyatmailoodotorg> Date: Sat, 3 Sep 2016 23:34:46 +0200 Use SIGALRM to make the server timeout 06e9c0735e637b1caf7bc32415880039e303f488 2016-09-03T21:28:34Z 2016-09-03T21:28:34Z Put host in serverloop in network order Willy willyatmailoodotorg commit 06e9c0735e637b1caf7bc32415880039e303f488 parent d0b15bb852ef0841e4d4542a91d45f0cc0fd02ab Author: Willy <willyatmailoodotorg> Date: Sat, 3 Sep 2016 23:28:34 +0200 Put host in serverloop in network order d0b15bb852ef0841e4d4542a91d45f0cc0fd02ab 2016-09-03T20:58:46Z 2016-09-03T20:58:46Z Use hostname over IP for ssh/rsync Willy willyatmailoodotorg commit d0b15bb852ef0841e4d4542a91d45f0cc0fd02ab parent 9e7246ff44e8e5a2bd5813d37683bc5640f6f8d7 Author: Willy <willyatmailoodotorg> Date: Sat, 3 Sep 2016 22:58:46 +0200 Use hostname over IP for ssh/rsync 9e7246ff44e8e5a2bd5813d37683bc5640f6f8d7 2016-09-02T17:02:03Z 2016-09-02T17:02:03Z Merge branch 'rspawn' Willy willyatmailoodotorg commit 9e7246ff44e8e5a2bd5813d37683bc5640f6f8d7 parent 82e2b998925748562da710ef5ec8a01df652ef01 Author: Willy <willyatmailoodotorg> Date: Fri, 2 Sep 2016 19:02:03 +0200 Merge branch 'rspawn' 82e2b998925748562da710ef5ec8a01df652ef01 2016-09-02T17:01:31Z 2016-09-02T17:01:31Z Make the HOST param mandatory Willy willyatmailoodotorg commit 82e2b998925748562da710ef5ec8a01df652ef01 parent 8360556462013f145204a0e253c09986886414bc Author: Willy <willyatmailoodotorg> Date: Fri, 2 Sep 2016 19:01:31 +0200 Make the HOST param mandatory 8360556462013f145204a0e253c09986886414bc 2016-09-02T16:59:48Z 2016-09-02T16:59:48Z Save the hostname information in peer_t structs Willy willyatmailoodotorg commit 8360556462013f145204a0e253c09986886414bc parent b90c17add7b3b57172237a1eea69253d90f2407c Author: Willy <willyatmailoodotorg> Date: Fri, 2 Sep 2016 18:59:48 +0200 Save the hostname information in peer_t structs b90c17add7b3b57172237a1eea69253d90f2407c 2016-09-02T16:57:30Z 2016-09-02T16:57:30Z Add function to quickly resolve hostnames to in_addr Willy willyatmailoodotorg commit b90c17add7b3b57172237a1eea69253d90f2407c parent 82cf376888b0a53cfc1928a739a951bd0fbf30b1 Author: Willy <willyatmailoodotorg> Date: Fri, 2 Sep 2016 18:57:30 +0200 Add function to quickly resolve hostnames to in_addr ed209850f9ea2cadc0d40d6b157f71cfd76ed36a 2016-09-02T11:57:41Z 2016-09-02T11:57:41Z Spawn a server-mode synk on each peer Willy willyatmailoodotorg commit ed209850f9ea2cadc0d40d6b157f71cfd76ed36a parent 82cf376888b0a53cfc1928a739a951bd0fbf30b1 Author: Willy <willyatmailoodotorg> Date: Fri, 2 Sep 2016 13:57:41 +0200 Spawn a server-mode synk on each peer 82cf376888b0a53cfc1928a739a951bd0fbf30b1 2016-09-02T11:52:57Z 2016-09-02T11:52:57Z Make server mode one-shot Willy willyatmailoodotorg commit 82cf376888b0a53cfc1928a739a951bd0fbf30b1 parent e88965f27c0b666e672353ad1a79558fe0f86f6b Author: Willy <willyatmailoodotorg> Date: Fri, 2 Sep 2016 13:52:57 +0200 Make server mode one-shot This make the server able to handle a single connection only, and thus, will make it terminate after syncing. this also moves threading out of the equation. e88965f27c0b666e672353ad1a79558fe0f86f6b 2016-09-01T23:07:48Z 2016-09-01T23:07:48Z Fix sha512_compare() to use a referent peer Willy willyatmailoodotorg commit e88965f27c0b666e672353ad1a79558fe0f86f6b parent b59800dbb6e6361dfe8e2597b3585450d8763509 Author: Willy <willyatmailoodotorg> Date: Fri, 2 Sep 2016 01:07:48 +0200 Fix sha512_compare() to use a referent peer b59800dbb6e6361dfe8e2597b3585450d8763509 2016-09-01T23:05:44Z 2016-09-01T23:05:44Z Add verbose flag Willy willyatmailoodotorg commit b59800dbb6e6361dfe8e2597b3585450d8763509 parent 91fe72f11a4c218d94a2694ad150ea1ed46edaae Author: Willy <willyatmailoodotorg> Date: Fri, 2 Sep 2016 01:05:44 +0200 Add verbose flag 91fe72f11a4c218d94a2694ad150ea1ed46edaae 2016-09-01T22:38:15Z 2016-09-01T22:39:39Z Read struct from server in chunks Willy willyatmailoodotorg commit 91fe72f11a4c218d94a2694ad150ea1ed46edaae parent 726cfff486a2c923d14397e15c8b64f95c7a96a3 Author: Willy <willyatmailoodotorg> Date: Fri, 2 Sep 2016 00:38:15 +0200 Read struct from server in chunks Structure will be sent from the server to the client in chunks of RECVSIZ bytes, to deal with data fractionning over TCP. 726cfff486a2c923d14397e15c8b64f95c7a96a3 2016-09-01T22:37:52Z 2016-09-01T22:37:52Z Implement log(LEVEL, fmt, ...) mechanism Willy willyatmailoodotorg commit 726cfff486a2c923d14397e15c8b64f95c7a96a3 parent 41d70cb397f5b59584e1ca4b95f3e16c340a4ce7 Author: Willy <willyatmailoodotorg> Date: Fri, 2 Sep 2016 00:37:52 +0200 Implement log(LEVEL, fmt, ...) mechanism 41d70cb397f5b59584e1ca4b95f3e16c340a4ce7 2016-09-01T22:36:04Z 2016-09-01T22:36:04Z Reformatting code for shorter lines Willy willyatmailoodotorg commit 41d70cb397f5b59584e1ca4b95f3e16c340a4ce7 parent 644b6f8d59e9e9770fbd096806256f4148b32e98 Author: Willy <willyatmailoodotorg> Date: Fri, 2 Sep 2016 00:36:04 +0200 Reformatting code for shorter lines 644b6f8d59e9e9770fbd096806256f4148b32e98 2016-09-01T16:34:12Z 2016-09-01T16:34:12Z syncfile() returns with 0 if no difference is found Willy willyatmailoodotorg commit 644b6f8d59e9e9770fbd096806256f4148b32e98 parent fa827f5f90ee4bb0bc0ebf47bebaab48045d62ed Author: Willy <willyatmailoodotorg> Date: Thu, 1 Sep 2016 18:34:12 +0200 syncfile() returns with 0 if no difference is found fa827f5f90ee4bb0bc0ebf47bebaab48045d62ed 2016-09-01T12:10:58Z 2016-09-01T12:10:58Z Function dosyncÃ(Ã) outputs the commands to run Willy willyatmailoodotorg commit fa827f5f90ee4bb0bc0ebf47bebaab48045d62ed parent 55f96b7e9985c6d3449d57bdd37b7720c6f5a4c1 Author: Willy <willyatmailoodotorg> Date: Thu, 1 Sep 2016 14:10:58 +0200 Function dosyncÃ(Ã) outputs the commands to run 55f96b7e9985c6d3449d57bdd37b7720c6f5a4c1 2016-09-01T12:09:15Z 2016-09-01T12:09:15Z Cosmetic changes and small bugfixes Willy willyatmailoodotorg commit 55f96b7e9985c6d3449d57bdd37b7720c6f5a4c1 parent 94ac24242e7b1a7d168e6c1505b71cb6a5585b99 Author: Willy <willyatmailoodotorg> Date: Thu, 1 Sep 2016 14:09:15 +0200 Cosmetic changes and small bugfixes 94ac24242e7b1a7d168e6c1505b71cb6a5585b99 2016-09-01T10:06:39Z 2016-09-01T10:06:46Z dosync() function to actually perform the synkro Willy willyatmailoodotorg commit 94ac24242e7b1a7d168e6c1505b71cb6a5585b99 parent deb721c47bda91d79cc7b7d6160a8d5b644359d6 Author: Willy <willyatmailoodotorg> Date: Thu, 1 Sep 2016 12:06:39 +0200 dosync() function to actually perform the synkro deb721c47bda91d79cc7b7d6160a8d5b644359d6 2016-09-01T06:05:57Z 2016-09-01T06:05:57Z Improve error checking in concat() Willy willyatmailoodotorg commit deb721c47bda91d79cc7b7d6160a8d5b644359d6 parent 41a5e83a69cf024c072941210d90196e213c3f9e Author: Willy <willyatmailoodotorg> Date: Thu, 1 Sep 2016 08:05:57 +0200 Improve error checking in concat() 41a5e83a69cf024c072941210d90196e213c3f9e 2016-08-31T21:46:50Z 2016-08-31T21:46:50Z New function to concatenate arrays Willy willyatmailoodotorg commit 41a5e83a69cf024c072941210d90196e213c3f9e parent da5b2a4bb3b995389485a50167dc232c8337b740 Author: Willy <willyatmailoodotorg> Date: Wed, 31 Aug 2016 23:46:50 +0200 New function to concatenate arrays da5b2a4bb3b995389485a50167dc232c8337b740 2016-08-30T22:15:56Z 2016-08-30T22:15:56Z Add an echo() function Willy willyatmailoodotorg commit da5b2a4bb3b995389485a50167dc232c8337b740 parent 500c9acbff9c266759980f4fa5162e40056c2054 Author: Willy <willyatmailoodotorg> Date: Wed, 31 Aug 2016 00:15:56 +0200 Add an echo() function 500c9acbff9c266759980f4fa5162e40056c2054 2016-08-30T21:03:38Z 2016-08-30T21:03:38Z Remove useless log Willy willyatmailoodotorg commit 500c9acbff9c266759980f4fa5162e40056c2054 parent 367e1d6ea7e87b08c1fc48db623e066015361ccd Author: Willy <willyatmailoodotorg> Date: Tue, 30 Aug 2016 23:03:38 +0200 Remove useless log 367e1d6ea7e87b08c1fc48db623e066015361ccd 2016-08-30T21:00:13Z 2016-08-30T21:00:13Z Have getmetadata() return a pointer to the metadata Willy willyatmailoodotorg commit 367e1d6ea7e87b08c1fc48db623e066015361ccd parent bfc62edabc6cbd02cb2788fed0ade60b56b9a282 Author: Willy <willyatmailoodotorg> Date: Tue, 30 Aug 2016 23:00:13 +0200 Have getmetadata() return a pointer to the metadata bfc62edabc6cbd02cb2788fed0ade60b56b9a282 2016-08-30T20:45:27Z 2016-08-30T20:45:27Z Comment getmetadata() function Willy willyatmailoodotorg commit bfc62edabc6cbd02cb2788fed0ade60b56b9a282 parent e1f37a92c2a59173505a48495338e7c37855a8b6 Author: Willy <willyatmailoodotorg> Date: Tue, 30 Aug 2016 22:45:27 +0200 Comment getmetadata() function e1f37a92c2a59173505a48495338e7c37855a8b6 2016-08-30T20:39:24Z 2016-08-30T20:39:24Z Rename syncstatus() to uptodate() Willy willyatmailoodotorg commit e1f37a92c2a59173505a48495338e7c37855a8b6 parent 66a2949e476739232a5cb7888d118d1f2d6dd5b8 Author: Willy <willyatmailoodotorg> Date: Tue, 30 Aug 2016 22:39:24 +0200 Rename syncstatus() to uptodate() 66a2949e476739232a5cb7888d118d1f2d6dd5b8 2016-08-30T20:35:13Z 2016-08-30T20:35:13Z Add syncfile(), the main wrapper function Willy willyatmailoodotorg commit 66a2949e476739232a5cb7888d118d1f2d6dd5b8 parent 697a309f1a1667cf47385370c18e3387af07c06d Author: Willy <willyatmailoodotorg> Date: Tue, 30 Aug 2016 22:35:13 +0200 Add syncfile(), the main wrapper function 697a309f1a1667cf47385370c18e3387af07c06d 2016-08-30T20:34:41Z 2016-08-30T20:34:41Z Add function to sync a master peer with a list Willy willyatmailoodotorg commit 697a309f1a1667cf47385370c18e3387af07c06d parent 7e527e7825ec47e18fbba3ebb88ef9910bfa5ec4 Author: Willy <willyatmailoodotorg> Date: Tue, 30 Aug 2016 22:34:41 +0200 Add function to sync a master peer with a list 7e527e7825ec47e18fbba3ebb88ef9910bfa5ec4 2016-08-30T20:33:09Z 2016-08-30T20:33:09Z Check sync status amongst a peer list Willy willyatmailoodotorg commit 7e527e7825ec47e18fbba3ebb88ef9910bfa5ec4 parent c20b5a3174a84d877f65d2885ec681943e67751f Author: Willy <willyatmailoodotorg> Date: Tue, 30 Aug 2016 22:33:09 +0200 Check sync status amongst a peer list c20b5a3174a84d877f65d2885ec681943e67751f 2016-08-30T20:32:24Z 2016-08-30T20:32:24Z Get the most recent file from a list of peers Willy willyatmailoodotorg commit c20b5a3174a84d877f65d2885ec681943e67751f parent 5db306110bbecf1f8b8f7067ef64f244716af280 Author: Willy <willyatmailoodotorg> Date: Tue, 30 Aug 2016 22:32:24 +0200 Get the most recent file from a list of peers 5db306110bbecf1f8b8f7067ef64f244716af280 2016-08-30T20:31:07Z 2016-08-30T20:31:07Z Add function to get metadata from a peer Willy willyatmailoodotorg commit 5db306110bbecf1f8b8f7067ef64f244716af280 parent 0b4e0f2bd28198e42d8dd21df92bf3c0b37bf544 Author: Willy <willyatmailoodotorg> Date: Tue, 30 Aug 2016 22:31:07 +0200 Add function to get metadata from a peer 0b4e0f2bd28198e42d8dd21df92bf3c0b37bf544 2016-08-30T20:26:41Z 2016-08-30T20:26:41Z Pass peer list head to functions Willy willyatmailoodotorg commit 0b4e0f2bd28198e42d8dd21df92bf3c0b37bf544 parent 4965d5192b39ed71a08892e0c75aba38a446a03c Author: Willy <willyatmailoodotorg> Date: Tue, 30 Aug 2016 22:26:41 +0200 Pass peer list head to functions 4965d5192b39ed71a08892e0c75aba38a446a03c 2016-08-27T15:24:42Z 2016-08-27T15:24:42Z Rename 'node' to 'peer' Willy willyatmailoodotorg commit 4965d5192b39ed71a08892e0c75aba38a446a03c parent 8230add7e8d3d28830d8a22976e111c323171fa2 Author: Willy <willyatmailoodotorg> Date: Sat, 27 Aug 2016 17:24:42 +0200 Rename 'node' to 'peer' 8230add7e8d3d28830d8a22976e111c323171fa2 2016-08-27T15:24:26Z 2016-08-27T15:24:26Z Add informations about functionnalities Willy willyatmailoodotorg commit 8230add7e8d3d28830d8a22976e111c323171fa2 parent 671e5ee704165beccfd85e7dbb60740d0c703bc7 Author: Willy <willyatmailoodotorg> Date: Sat, 27 Aug 2016 17:24:26 +0200 Add informations about functionnalities 671e5ee704165beccfd85e7dbb60740d0c703bc7 2016-08-26T06:58:42Z 2016-08-26T06:58:42Z Provide an insight of the algorithm Willy willyatmailoodotorg commit 671e5ee704165beccfd85e7dbb60740d0c703bc7 parent e91bc489c877001d81332b0f1d26c41a54c572d9 Author: Willy <willyatmailoodotorg> Date: Fri, 26 Aug 2016 08:58:42 +0200 Provide an insight of the algorithm e91bc489c877001d81332b0f1d26c41a54c572d9 2016-08-26T06:25:42Z 2016-08-26T06:25:42Z Clean peer list after processing Willy willyatmailoodotorg commit e91bc489c877001d81332b0f1d26c41a54c572d9 parent 37a972d5c8dfb078d5e9ad89642a7de7faa84b3d Author: Willy <willyatmailoodotorg> Date: Fri, 26 Aug 2016 08:25:42 +0200 Clean peer list after processing 37a972d5c8dfb078d5e9ad89642a7de7faa84b3d 2016-08-25T07:23:36Z 2016-08-25T07:23:36Z Get the list of peers from the command line Willy willyatmailoodotorg commit 37a972d5c8dfb078d5e9ad89642a7de7faa84b3d parent 52f63e2b5605b854bd5c82b14cfc588ce8530eca Author: Willy <willyatmailoodotorg> Date: Thu, 25 Aug 2016 09:23:36 +0200 Get the list of peers from the command line By specifying the -h flag mutliple time, one can add multiple peer for metadata comparison. Each host will be loaded in the order specified. As the -p attributes modifies the variable when it's evaluated, one can specify different ports for each host by specifying the port BEFORE the host: synk -p 1234 -h 10.0.0.1 -p 5678 -h 10.0.0.2 FILE This will queue up the following hosts: * 10.0.0.1:1234 * 10.0.0.2:5678 Regarding server mode, one will have to specify the -s flag BEFORE the address to bind to in order to avoid creating a new node_t structure: synk -s -h 0.0.0.0 52f63e2b5605b854bd5c82b14cfc588ce8530eca 2016-08-25T06:11:15Z 2016-08-25T06:11:15Z Move comparison logic out of getpeerinfo() Willy willyatmailoodotorg commit 52f63e2b5605b854bd5c82b14cfc588ce8530eca parent 613d8bc78a5d4230b4c6157ae1921d548569405b Author: Willy <willyatmailoodotorg> Date: Thu, 25 Aug 2016 08:11:15 +0200 Move comparison logic out of getpeerinfo() 613d8bc78a5d4230b4c6157ae1921d548569405b 2016-08-24T13:13:36Z 2016-08-24T13:13:36Z Add SLIST for peers handling Willy willyatmailoodotorg commit 613d8bc78a5d4230b4c6157ae1921d548569405b parent 23aed767285fc976c45fbb874cc11fef0ccb464d Author: Willy <willyatmailoodotorg> Date: Wed, 24 Aug 2016 15:13:36 +0200 Add SLIST for peers handling 23aed767285fc976c45fbb874cc11fef0ccb464d 2016-08-24T06:45:54Z 2016-08-24T06:45:54Z Create one thread per client Willy willyatmailoodotorg commit 23aed767285fc976c45fbb874cc11fef0ccb464d parent 061a8d1893ef222177f12dcd1d0f9ec84ca572c0 Author: Willy <willyatmailoodotorg> Date: Wed, 24 Aug 2016 08:45:54 +0200 Create one thread per client 061a8d1893ef222177f12dcd1d0f9ec84ca572c0 2016-08-24T06:45:27Z 2016-08-24T06:45:27Z Move sha512 functions to sha512.c Willy willyatmailoodotorg commit 061a8d1893ef222177f12dcd1d0f9ec84ca572c0 parent 8c80e23c0813a078879f506afca68141a9c060a7 Author: Willy <willyatmailoodotorg> Date: Wed, 24 Aug 2016 08:45:27 +0200 Move sha512 functions to sha512.c 8c80e23c0813a078879f506afca68141a9c060a7 2016-08-23T16:17:43Z 2016-08-23T16:17:43Z Use structure for TCP communications Willy willyatmailoodotorg commit 8c80e23c0813a078879f506afca68141a9c060a7 parent 8426dc6f82ed4939a3702ff9c2c0e51cfa3d76fd Author: Willy <willyatmailoodotorg> Date: Tue, 23 Aug 2016 18:17:43 +0200 Use structure for TCP communications 8426dc6f82ed4939a3702ff9c2c0e51cfa3d76fd 2016-08-22T12:19:33Z 2016-08-22T12:19:33Z Fucking shell globs Willy willyatmailoodotorg commit 8426dc6f82ed4939a3702ff9c2c0e51cfa3d76fd parent c775ea906f42095dd1fb1e0ed70f318b8b6486b7 Author: Willy <willyatmailoodotorg> Date: Mon, 22 Aug 2016 14:19:33 +0200 Fucking shell globs c775ea906f42095dd1fb1e0ed70f318b8b6486b7 2016-08-22T12:18:37Z 2016-08-22T12:18:37Z Put path,sha512 and timestamp in a buffer for sending Willy willyatmailoodotorg commit c775ea906f42095dd1fb1e0ed70f318b8b6486b7 parent b2f3ca3bc98416b32e22a2c5737f1e40bf94b707 Author: Willy <willyatmailoodotorg> Date: Mon, 22 Aug 2016 14:18:37 +0200 Put path,sha512 and timestamp in a buffer for sending b2f3ca3bc98416b32e22a2c5737f1e40bf94b707 2016-08-22T12:17:22Z 2016-08-22T12:17:22Z Loop infinitely in server mode Willy willyatmailoodotorg commit b2f3ca3bc98416b32e22a2c5737f1e40bf94b707 parent 1eb5f4be1f3e0da4bd419889f40a99dc67cd2ac6 Author: Willy <willyatmailoodotorg> Date: Mon, 22 Aug 2016 14:17:22 +0200 Loop infinitely in server mode 1eb5f4be1f3e0da4bd419889f40a99dc67cd2ac6 2016-08-22T12:16:15Z 2016-08-22T12:16:15Z Add function to format a sha512 hash as a base16 string Willy willyatmailoodotorg commit 1eb5f4be1f3e0da4bd419889f40a99dc67cd2ac6 parent 52315a137481905a33e482df08128ee85f90b6b5 Author: Willy <willyatmailoodotorg> Date: Mon, 22 Aug 2016 14:16:15 +0200 Add function to format a sha512 hash as a base16 string 52315a137481905a33e482df08128ee85f90b6b5 2016-08-22T06:42:36Z 2016-08-22T06:42:36Z Make client/server send sha512 digests for comparison Willy willyatmailoodotorg commit 52315a137481905a33e482df08128ee85f90b6b5 parent 8e9a6f6cd8321f42ac8d55456b1092ef7a61f191 Author: Willy <willyatmailoodotorg> Date: Mon, 22 Aug 2016 08:42:36 +0200 Make client/server send sha512 digests for comparison 8e9a6f6cd8321f42ac8d55456b1092ef7a61f191 2016-08-22T06:41:20Z 2016-08-22T06:41:20Z Function to compare hashes Willy willyatmailoodotorg commit 8e9a6f6cd8321f42ac8d55456b1092ef7a61f191 parent e107f99cfc32c18f5c8902f461b70336973de2d5 Author: Willy <willyatmailoodotorg> Date: Mon, 22 Aug 2016 08:41:20 +0200 Function to compare hashes e107f99cfc32c18f5c8902f461b70336973de2d5 2016-08-22T06:24:00Z 2016-08-22T06:24:56Z New function to generate a stream's hash Willy willyatmailoodotorg commit e107f99cfc32c18f5c8902f461b70336973de2d5 parent fcee4829b1e08b2e87a49f3c64a15108eceeba3a Author: Willy <willyatmailoodotorg> Date: Mon, 22 Aug 2016 08:24:00 +0200 New function to generate a stream's hash fcee4829b1e08b2e87a49f3c64a15108eceeba3a 2016-08-19T18:35:21Z 2016-08-19T18:35:21Z Fix up sha512 function for standalone use Willy willyatmailoodotorg commit fcee4829b1e08b2e87a49f3c64a15108eceeba3a parent 8aad91fb1540045a248744041212c426a34b589d Author: Willy <willyatmailoodotorg> Date: Fri, 19 Aug 2016 20:35:21 +0200 Fix up sha512 function for standalone use 8aad91fb1540045a248744041212c426a34b589d 2016-08-18T21:15:22Z 2016-08-18T21:15:44Z Add sha512 functions from libtom.net Willy willyatmailoodotorg commit 8aad91fb1540045a248744041212c426a34b589d parent dcf66f769d632628259c687de8ad059e2a4ac2e6 Author: Willy <willyatmailoodotorg> Date: Thu, 18 Aug 2016 23:15:22 +0200 Add sha512 functions from libtom.net dcf66f769d632628259c687de8ad059e2a4ac2e6 2016-08-17T06:39:02Z 2016-08-17T06:39:02Z Code cleanup/refactoring Willy willyatmailoodotorg commit dcf66f769d632628259c687de8ad059e2a4ac2e6 parent 4c40d8e0cfbe7589ccd89c8e97f1cbf11a5844cf Author: Willy <willyatmailoodotorg> Date: Wed, 17 Aug 2016 08:39:02 +0200 Code cleanup/refactoring 4c40d8e0cfbe7589ccd89c8e97f1cbf11a5844cf 2016-08-16T18:37:36Z 2016-08-16T18:37:36Z Factorize timestamps retrieval Willy willyatmailoodotorg commit 4c40d8e0cfbe7589ccd89c8e97f1cbf11a5844cf parent b3dca9f5dc37c9e6190b5f6532ce9099b49ad2e7 Author: Willy <willyatmailoodotorg> Date: Tue, 16 Aug 2016 20:37:36 +0200 Factorize timestamps retrieval b3dca9f5dc37c9e6190b5f6532ce9099b49ad2e7 2016-08-16T18:36:27Z 2016-08-16T18:36:27Z Remove dependency to pthreads Willy willyatmailoodotorg commit b3dca9f5dc37c9e6190b5f6532ce9099b49ad2e7 parent 01aea7ee2faa01002207932529972d3c491dfca1 Author: Willy <willyatmailoodotorg> Date: Tue, 16 Aug 2016 20:36:27 +0200 Remove dependency to pthreads 01aea7ee2faa01002207932529972d3c491dfca1 2016-08-16T12:02:00Z 2016-08-16T12:02:00Z Move client/server part into a single program Willy willyatmailoodotorg commit 01aea7ee2faa01002207932529972d3c491dfca1 parent 78511ee61482c9fbf336fa601f841113a5544d1e Author: Willy <willyatmailoodotorg> Date: Tue, 16 Aug 2016 14:02:00 +0200 Move client/server part into a single program 78511ee61482c9fbf336fa601f841113a5544d1e 2016-08-16T12:00:33Z 2016-08-16T12:00:33Z synkd: move server part into a function Willy willyatmailoodotorg commit 78511ee61482c9fbf336fa601f841113a5544d1e parent e355d45e1f7b7db572874e8e0a5770470a42a0a6 Author: Willy <willyatmailoodotorg> Date: Tue, 16 Aug 2016 14:00:33 +0200 synkd: move server part into a function e355d45e1f7b7db572874e8e0a5770470a42a0a6 2016-08-16T06:48:11Z 2016-08-16T06:48:11Z Moving client/server part into functions Willy willyatmailoodotorg commit e355d45e1f7b7db572874e8e0a5770470a42a0a6 parent d19f7b2d444e65f4d780ac3132968e432110ede9 Author: Willy <willyatmailoodotorg> Date: Tue, 16 Aug 2016 08:48:11 +0200 Moving client/server part into functions