diff --git a/src/main.c b/src/main.c index 76a8f02..22c86e7 100644 --- a/src/main.c +++ b/src/main.c @@ -4,6 +4,7 @@ #include "net.h" #include #include +#include #define CHANNELS 1 #define SAMPLE_RATE 48000 @@ -24,6 +25,10 @@ int main(int argc, char **argv) { addrbook_t ab = {0}; FILE *in = fopen("addressbook_key", "r"); + if (in == NULL) { + fprintf(stderr, "An addressbook file wasn't open: %s\n", strerror(errno)); + return 1; + } addrbook_load(&ab, in);