X-Git-Url: https://disinclined.org/git/?a=blobdiff_plain;f=server.c;h=527d737b0c5d2c9a76e261fa92069e92cfc03849;hb=17c70c20cbc1d76cb78c92fb59a407724d2d92d1;hp=ba564e270009e7736a03c56f389067e25e194747;hpb=3696abeb3e48a88da066b95d52de2bc8b58f3f6b;p=irssi-notify.git diff --git a/server.c b/server.c index ba564e2..527d737 100644 --- a/server.c +++ b/server.c @@ -56,7 +56,7 @@ int main(void) for(p = servinfo; p != NULL; p = p->ai_next) { if ((sockfd = socket(p->ai_family, p->ai_socktype, p->ai_protocol)) == -1) { - perror("server: socket"); + perror("irssi-notify: socket"); continue; } @@ -68,7 +68,7 @@ int main(void) if (bind(sockfd, p->ai_addr, p->ai_addrlen) == -1) { close(sockfd); - perror("server: bind"); + perror("irssi-notify: bind"); continue; } @@ -76,7 +76,7 @@ int main(void) } if (p == NULL) { - fprintf(stderr, "server: failed to bind\n"); + fprintf(stderr, "irssi-notify: failed to bind\n"); return 2; } @@ -95,7 +95,7 @@ int main(void) exit(1); } - printf("server: waiting for connections...\n"); + printf("irssi-notify: waiting for connections...\n"); while(1) { // main accept() loop sin_size = sizeof their_addr; @@ -123,10 +123,10 @@ int main(void) exit(1); } buf[4096] = '\0'; - printf("server: recieved '%s'\n", buf); + printf("irssi-notify: recieved '%s'\n", buf); if (!fork()){ setenv("DISPLAY", ":0", 1); // doesn't seem to be doing the trick - execl("notify-display", + execlp("notify-display", "notify-display", buf, NULL); // the first argument to execl is the command, the second is the first argument // passed to the program ($0), customarily the evocation of the command