Debug logging

This commit is contained in:
akp 2023-11-02 17:34:40 +00:00
parent 91bcde20e5
commit abc3732e0e
No known key found for this signature in database
GPG key ID: CF8D58F3DEB20755

View file

@ -3,10 +3,12 @@
#include <pthread.h>
#include <signal.h>
#define ADDR "127.0.0.1"
int sd;
int run_server(const char **port_str) {
if (open_socket("127.0.0.1", *port_str, &sd) != 0) {
if (open_socket(ADDR, *port_str, &sd) != 0) {
return 1;
}
@ -44,6 +46,8 @@ int main (int argc, char **argv) {
&port_str
);
fprintf(stderr, "Alive on %s:%s\n", ADDR, port_str);
signal(SIGINT, &sigint_handler);
int res, status;