mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-04-09 03:54:15 +00:00
Quieten some unconditional DEBUG messages
This commit is contained in:
parent
5751569b59
commit
3d55a019c0
@ -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);
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user