disinclined.org
/
git
/
irssi-notify.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
3696abe
)
updated status messages
author
Dylan Lloyd
<dylan@dylansserver.com>
Mon, 20 Feb 2012 20:30:22 +0000
(15:30 -0500)
committer
Dylan Lloyd
<dylan@dylansserver.com>
Mon, 20 Feb 2012 20:30:22 +0000
(15:30 -0500)
server.c
patch
|
blob
|
history
diff --git
a/server.c
b/server.c
index
ba564e2
..
6276c9f
100644
(file)
--- 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) {
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;
}
continue;
}
@@
-68,7
+68,7
@@
int main(void)
if (bind(sockfd, p->ai_addr, p->ai_addrlen) == -1) {
close(sockfd);
if (bind(sockfd, p->ai_addr, p->ai_addrlen) == -1) {
close(sockfd);
- perror("
server
: bind");
+ perror("
irssi-notify
: bind");
continue;
}
continue;
}
@@
-76,7
+76,7
@@
int main(void)
}
if (p == NULL) {
}
if (p == NULL) {
- fprintf(stderr, "
server
: failed to bind\n");
+ fprintf(stderr, "
irssi-notify
: failed to bind\n");
return 2;
}
return 2;
}
@@
-95,7
+95,7
@@
int main(void)
exit(1);
}
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;
while(1) { // main accept() loop
sin_size = sizeof their_addr;
@@
-123,7
+123,7
@@
int main(void)
exit(1);
}
buf[4096] = '\0';
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",
if (!fork()){
setenv("DISPLAY", ":0", 1); // doesn't seem to be doing the trick
execl("notify-display",