Skip to content

Commit

Permalink
Add debug log
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Ortmann committed Jan 6, 2024
1 parent 32cf2d7 commit 612762a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/users.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#include "modules.h"
#include "tandem.h"

#include <errno.h>
#include <netinet/in.h>
#include <arpa/inet.h>

Expand Down Expand Up @@ -698,9 +699,10 @@ int readuserfile(char *file, struct userrec **ret)
global_invites = NULL;
}
lasthand[0] = 0;
f = fopen(file, "r");
if (f == NULL)
if (!(f = fopen(file, "r"))) {
debug2("users: fopen(%s): %s", file, strerror(errno));
return 0;
}
noshare = noxtra = 1;
/* read opening comment */
s = buf;
Expand Down

0 comments on commit 612762a

Please sign in to comment.