Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gnr/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ static void freetag(struct nafmodule *mod, void *object, const char *tagname, ch

} else {

dvprintf(mod, "freetag: unknown tag '%s'\n", tagname);
tvprintf(mod, "freetag: unknown tag '%s'\n", tagname);

}

Expand Down
6 changes: 3 additions & 3 deletions gnr/msg.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ int gnr_msg_route(struct nafmodule *srcmod, struct gnrmsg *gm)
/* Make sure we're routing a sane message... */
if (!gm || !gm->srcname || !gm->srcnameservice ||
!gm->destname || !gm->destnameservice) {
dvprintf(gnr__module, "gnr_msg_route: invalid args (%p/%s[%s]/%s[%s])\n",
tvprintf(gnr__module, "gnr_msg_route: invalid args (%p/%s[%s]/%s[%s])\n",
gm,
gm ? gm->srcname : NULL,
gm ? gm->srcnameservice : NULL,
Expand All @@ -283,7 +283,7 @@ int gnr_msg_route(struct nafmodule *srcmod, struct gnrmsg *gm)
gmhi.destnode = gnr_node_findbyname(gm->destname, gm->destnameservice);

if (gnr__debug > 0) {
dvprintf(gnr__module, "gnr_msg_route: from %s, %s[%s] -> %s[%s], msgtext = (%s) '%s', msgflags = %08lx, srconn = %d\n",
tvprintf(gnr__module, "gnr_msg_route: from %s, %s[%s] -> %s[%s], msgtext = (%s) '%s', msgflags = %08lx, srconn = %d\n",
srcmod,
gm->srcname, gm->srcnameservice,
gm->destname, gm->destnameservice,
Expand Down Expand Up @@ -330,7 +330,7 @@ int gnr_msg_route(struct nafmodule *srcmod, struct gnrmsg *gm)
timersub(&tvout, &tvin, &tv);
el = (double)tv.tv_sec + ((double)tv.tv_usec / 1000000);
el *= 1000; /* milliseconds */
dvprintf(gnr__module, "gnr_msg_route: time elapsed since message input: %gms\n", el);
tvprintf(gnr__module, "gnr_msg_route: time elapsed since message input: %gms\n", el);
}
#endif
return 0;
Expand Down
6 changes: 3 additions & 3 deletions gnr/node.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ static void freenode(struct gnrnode *gn, int reason)
}

#if 0
dvprintf(gnr__module, "user offline: %s[%s][%s][%s%s%s] -- %s%s%s\n",
tvprintf(gnr__module, "user offline: %s[%s][%s][%s%s%s] -- %s%s%s\n",
gn->name,
gn->service,
gn->ownermod ? gn->ownermod->name : "unknown",
Expand Down Expand Up @@ -424,7 +424,7 @@ struct gnrnode *gnr_node_online(struct nafmodule *owner, const char *name, const
gnr__nodestats.peered++;

#if 0
dvprintf(gnr__module, "user online: %s[%s][%s][%s%s%s]\n",
tvprintf(gnr__module, "user online: %s[%s][%s][%s%s%s]\n",
gn->name,
gn->service,
gn->ownermod ? gn->ownermod->name : "unknown",
Expand Down Expand Up @@ -458,7 +458,7 @@ int gnr_node_remetric(struct gnrnode *gn, int newmetric)
return -1;

if (gn->metric < newmetric)
dvprintf(gnr__module, "BUG: gnr_node_remetric asked to make node %s[%s] farther away (new = %d, old = %d)\n", gn->name, gn->service, newmetric, gn->metric);
tvprintf(gnr__module, "BUG: gnr_node_remetric asked to make node %s[%s] farther away (new = %d, old = %d)\n", gn->name, gn->service, newmetric, gn->metric);


if (gn->metric == GNR_NODE_METRIC_LOCAL)
Expand Down
8 changes: 4 additions & 4 deletions include/naf/nafevents.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@
int nafeventv(struct nafmodule *source, naf_event_t event, va_list inap);
int nafevent(struct nafmodule *mod, naf_event_t event, ...);

#define dprintf(p, x) nafevent(p, NAF_EVENT_GENERICOUTPUT, x)
#define tprintf(p, x) nafevent(p, NAF_EVENT_GENERICOUTPUT, x)
#ifdef NOVAMACROS
int dvprintf(struct nafmodule *mod, ...);
int tvprintf(struct nafmodule *mod, ...);
#else
#define dvprintf(p, x, y...) nafevent(p, NAF_EVENT_GENERICOUTPUT, x, y)
#define tvprintf(p, x, y...) nafevent(p, NAF_EVENT_GENERICOUTPUT, x, y)
#endif
#define dperror(p, x) nafevent(p, NAF_EVENT_DEBUGOUTPUT, "%s: %s\n", x, strerror(errno))
#define tperror(p, x) nafevent(p, NAF_EVENT_DEBUGOUTPUT, "%s: %s\n", x, strerror(errno))

#endif /* __NAF_EVENTS_H__ */

4 changes: 2 additions & 2 deletions modules/nafbasicmodule/basicmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ static struct nafmodule *ourmodule = NULL;
static int modinit(struct nafmodule *mod)
{

dprintf(mod, "module initializing!\n");
tprintf(mod, "module initializing!\n");

return 0;
}

static int modshutdown(struct nafmodule *mod)
{

dprintf(mod, "module shutting down!\n");
tprintf(mod, "module shutting down!\n");

return 0;
}
Expand Down
4 changes: 2 additions & 2 deletions modules/nafconsole/nafconsole.c
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ static int modinit(struct nafmodule *mod)
* Yay for "everything's a file".
*/
if (!(in = naf_conn_addconn(mod, STDIN_FILENO, NAF_CONN_TYPE_RAW|NAF_CONN_TYPE_SERVER|NAF_CONN_TYPE_READRAW))) {
dprintf(mod, "unable to create nafconn for stdin\n");
tprintf(mod, "unable to create nafconn for stdin\n");
return -1;
}

Expand Down Expand Up @@ -673,7 +673,7 @@ static void macro_syncconf__addnew(const char *inlist)

def = macro_syncconf__getexpansion(c);
if (!def) {
dvprintf(nafconsole__module, "configuration error: macro '%s' enabled but not defined\n", c);
tvprintf(nafconsole__module, "configuration error: macro '%s' enabled but not defined\n", c);
continue;
}

Expand Down
12 changes: 6 additions & 6 deletions modules/timpsotr/timpsotr.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ totr_uiop__create_privkey(void *opdata, const char *accountname, const char *pro
char *fingerprint;

if (timps_otr__debug > 0)
dvprintf(mod, "creating private key for %s[%s]\n", accountname, protocol);
tvprintf(mod, "creating private key for %s[%s]\n", accountname, protocol);

if (!(pkfn = totr_mkfilename(mod, TOTR_PRIVATEKEYFN)))
return;
Expand Down Expand Up @@ -253,7 +253,7 @@ totr_uiop__notify(void *opdata, OtrlNotifyLevel level, const char *title, const
primary ? primary : "",
secondary ? secondary : "");
#else
dvprintf(mod, "notification from libotr: %s%s%s: %s (%s)\n",
tvprintf(mod, "notification from libotr: %s%s%s: %s (%s)\n",
(level == OTRL_NOTIFY_ERROR) ? "ERROR" : "",
(level == OTRL_NOTIFY_WARNING) ? "WARNING" : "",
(level == OTRL_NOTIFY_INFO) ? "Note" : "",
Expand Down Expand Up @@ -304,7 +304,7 @@ totr_uiop__confirm_fingerprint(void *opdata, const char *username, const char *p
otrl_privkey_hash_to_human(fingerprint, kem->key_fingerprint);

if (timps_otr__debug > 0) {
dvprintf(mod, "received fingerprint for %s[%s]: %s\n",
tvprintf(mod, "received fingerprint for %s[%s]: %s\n",
username, protocol, fingerprint);
}

Expand Down Expand Up @@ -408,7 +408,7 @@ totr_uiop__log_message(void *opdata, const char *message)
* directly to them.
*/
/* Comes with \n on the end */
dvprintf(mod, "message from libotr: %s", message);
tvprintf(mod, "message from libotr: %s", message);

return;
}
Expand Down Expand Up @@ -612,7 +612,7 @@ freetag(struct nafmodule *mod, void *object, const char *tagname, char tagtype,
if (strcmp(tagname, "gnrmsg.newotrmsgtext") == 0)
naf_free(mod, (char *)tagdata);
else
dvprintf(mod, "freetag: unknown tagname '%s'\n", tagname);
tvprintf(mod, "freetag: unknown tagname '%s'\n", tagname);

return;
}
Expand All @@ -624,7 +624,7 @@ modinit(struct nafmodule *mod)
timps_otr__module = mod;

if (gnr_msg_register(mod, totr_gnroutputfunc) == -1) {
dprintf(mod, "modinit: gsr_msg_register failed\n");
tprintf(mod, "modinit: gsr_msg_register failed\n");
return -1;
}
gnr_msg_addmsghandler(mod, GNR_MSG_MSGHANDLER_STAGE_ROUTING, 30, totr_msgroutinghandler, "Off-the-record messaging");
Expand Down
Loading