return(enc);
}
-static void logunimpl(char *cmd, char *args)
+static void logunimpl(char *list, char *cmd, char *args)
{
FILE *log;
flog(LOG_WARNING, "could not open unimpl log: %s", strerror(errno));
return;
}
+ fputs(list, log);
+ fputc('\t', log);
fputs(quotestr(cmd), log);
if(args != NULL)
{
break;
}
if(cmd->handler != NULL)
+ {
cmd->handler(sk, data, qcmd->string, p);
- else if(confgetint("dc", "logunimpl"))
- logunimpl(qcmd->string, p);
+ } else if(confgetint("dc", "logunimpl")) {
+ if(cmdlist == hubcmds)
+ logunimpl("hub", qcmd->string, p);
+ else if(cmdlist == peercmds)
+ logunimpl("peer", qcmd->string, p);
+ else
+ logunimpl("other?!", qcmd->string, p);
+ }
}
static int run(void)