diff options
author | Roger Dingledine <arma@torproject.org> | 2007-08-11 14:13:25 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2007-08-11 14:13:25 +0000 |
commit | 330abbb6c61a7a2eb39b5b921ff1c3a1a80beca0 (patch) | |
tree | 34e9c5db5eddc71d14db45d75b5622ce2e73e8e6 /src/or/rendservice.c | |
parent | 59204840832482a128039f5fb6d18faccfb11207 (diff) | |
download | tor-330abbb6c61a7a2eb39b5b921ff1c3a1a80beca0.tar.gz tor-330abbb6c61a7a2eb39b5b921ff1c3a1a80beca0.zip |
logging patch from karsten, slightly modified to compile
svn:r11074
Diffstat (limited to 'src/or/rendservice.c')
-rw-r--r-- | src/or/rendservice.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/or/rendservice.c b/src/or/rendservice.c index 8ec3888098..f689508d56 100644 --- a/src/or/rendservice.c +++ b/src/or/rendservice.c @@ -791,6 +791,7 @@ rend_service_intro_established(origin_circuit_t *circuit, const char *request, size_t request_len) { rend_service_t *service; + char serviceid[REND_SERVICE_ID_LEN+1]; (void) request; (void) request_len; @@ -808,6 +809,12 @@ rend_service_intro_established(origin_circuit_t *circuit, const char *request, service->desc_is_dirty = time(NULL); circuit->_base.purpose = CIRCUIT_PURPOSE_S_INTRO; + base32_encode(serviceid, REND_SERVICE_ID_LEN + 1, + circuit->rend_pk_digest, 10); + log_info(LD_REND, + "Received INTRO_ESTABLISHED cell on circuit %d for service %s", + circuit->_base.n_circ_id, serviceid); + return 0; err: circuit_mark_for_close(TO_CIRCUIT(circuit), END_CIRC_REASON_TORPROTOCOL); @@ -934,6 +941,7 @@ upload_service_descriptor(rend_service_t *service, int version) { char *desc; size_t desc_len; + char serviceid[REND_SERVICE_ID_LEN+1]; /* Update the descriptor. */ rend_service_update_descriptor(service); @@ -947,6 +955,9 @@ upload_service_descriptor(rend_service_t *service, int version) } /* Post it to the dirservers */ + rend_get_service_id(service->private_key, serviceid); + log_info(LD_REND, "Sending publish request for hidden service %s", + serviceid); directory_post_to_dirservers(DIR_PURPOSE_UPLOAD_RENDDESC, ROUTER_PURPOSE_GENERAL, HIDSERV_AUTHORITY, desc, desc_len, 0); |