Use a temporary service list when validating and adding hidden services
commit8a0ea3ee43da0063c2546092662fa7ce4900bc2c
authorteor <teor2345@gmail.com>
Fri, 2 Dec 2016 21:25:50 +0000 (3 08:25 +1100)
committerteor <teor2345@gmail.com>
Fri, 2 Dec 2016 22:10:46 +0000 (3 09:10 +1100)
tree6215ad829910b7311a67e5f8f5357683f82c703b
parent93c62f5ac1757f171c8a0b51f8320f48eba885a6
Use a temporary service list when validating and adding hidden services

This resolves two issues:
* the checks in rend_add_services were only being performed when adding
  the service, and not when the service was validated,
  (this meant that duplicate checks were not being performed, and some SETCONF
  commands appeared to succeed when they actually failed), and
* if one service failed while services were being added, then the service
  list would be left in an inconsistent state (tor dies when this happens,
  but the code is cleaner now).

Fixes #20860.
changes/bug20860 [new file with mode: 0644]
src/or/rendservice.c