Quieten some unconditional DEBUG messages

This commit is contained in:
Andrew Bettison 2012-11-08 10:23:57 +10:30
parent 5751569b59
commit 3d55a019c0
2 changed files with 25 additions and 24 deletions

View File

@ -208,29 +208,30 @@ int set_reachable(struct subscriber *subscriber, int reachable){
int old_value=subscriber->reachable;
subscriber->reachable=reachable;
// these log messages may be used in tests
switch(reachable){
case REACHABLE_NONE:
DEBUGF("%s is not reachable", alloca_tohex_sid(subscriber->sid));
break;
case REACHABLE_SELF:
break;
case REACHABLE_DIRECT:
DEBUGF("%s is now reachable directly", alloca_tohex_sid(subscriber->sid));
break;
case REACHABLE_INDIRECT:
DEBUGF("%s is now reachable indirectly", alloca_tohex_sid(subscriber->sid));
break;
case REACHABLE_UNICAST:
DEBUGF("%s is now reachable via unicast", alloca_tohex_sid(subscriber->sid));
break;
case REACHABLE_BROADCAST:
DEBUGF("%s is now reachable via broadcast", alloca_tohex_sid(subscriber->sid));
break;
// These log messages are for use in tests. Changing them may break test scripts.
if (debug&DEBUG_OVERLAYROUTING) {
switch (reachable) {
case REACHABLE_NONE:
DEBUGF("NOT REACHABLE sid=%s", alloca_tohex_sid(subscriber->sid));
break;
case REACHABLE_SELF:
break;
case REACHABLE_DIRECT:
DEBUGF("REACHABLE DIRECTLY sid=%s", alloca_tohex_sid(subscriber->sid));
break;
case REACHABLE_INDIRECT:
DEBUGF("REACHABLE INDIRECTLY sid=%s", alloca_tohex_sid(subscriber->sid));
break;
case REACHABLE_UNICAST:
DEBUGF("REACHABLE VIA UNICAST sid=%s", alloca_tohex_sid(subscriber->sid));
break;
case REACHABLE_BROADCAST:
DEBUGF("REACHABLE VIA BROADCAST sid=%s", alloca_tohex_sid(subscriber->sid));
break;
}
}
/* Pre-emptively send a sas request */
if (!subscriber->sas_valid && reachable!=REACHABLE_SELF && reachable!=REACHABLE_NONE && reachable!=REACHABLE_BROADCAST)
keyring_send_sas_request(subscriber);

View File

@ -909,14 +909,14 @@ int rhizome_list_manifests(const char *service, const char *sender_sid, const ch
long long blob_filesize = rhizome_manifest_get_ll(m, "filesize");
int from_here = 0;
if (q_author) {
DEBUGF("q_author=%s", alloca_str_toprint(q_author));
if (debug & DEBUG_RHIZOME) DEBUGF("q_author=%s", alloca_str_toprint(q_author));
unsigned char authorSid[SID_SIZE];
stowSid(authorSid, 0, q_author);
int cn = 0, in = 0, kp = 0;
from_here = keyring_find_sid(keyring, &cn, &in, &kp, authorSid);
}
if (!from_here && blob_sender) {
DEBUGF("blob_sender=%s", alloca_str_toprint(blob_sender));
if (debug & DEBUG_RHIZOME) DEBUGF("blob_sender=%s", alloca_str_toprint(blob_sender));
unsigned char senderSid[SID_SIZE];
stowSid(senderSid, 0, blob_sender);
int cn = 0, in = 0, kp = 0;