summaryrefslogtreecommitdiff
path: root/blabouncer.c
diff options
context:
space:
mode:
Diffstat (limited to 'blabouncer.c')
-rw-r--r--blabouncer.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/blabouncer.c b/blabouncer.c
index 679c775..49e8f4b 100644
--- a/blabouncer.c
+++ b/blabouncer.c
@@ -87,13 +87,13 @@ void dochat(int *sockfd, char *buf) {
FD_SET(STDIN, &rfds); // add STDIN (fd 0) to read fds to monitor
FD_SET(*sockfd, &rfds); // add our network socket ''
- if(select(*sockfd + 1, &rfds, NULL, NULL, NULL) < 0) { // network socket + 1, rfds, no writes, no exceptions/errors, no timeout
+ if (select(*sockfd + 1, &rfds, NULL, NULL, NULL) < 0) { // network socket + 1, rfds, no writes, no exceptions/errors, no timeout
printf("receive error, exiting!?\n");
perror("select");
// TODO exit here?
}
- if(FD_ISSET(*sockfd, &rfds)) {
+ if (FD_ISSET(*sockfd, &rfds)) {
printf("reading socket!\n");
if ((numbytes = recv(*sockfd, buf, MAXDATASIZE - 1, 0)) == -1) {
@@ -110,7 +110,7 @@ void dochat(int *sockfd, char *buf) {
printf("RECEIVED: %s\n",buf);
}
- if(FD_ISSET(STDIN, &rfds)) {
+ if (FD_ISSET(STDIN, &rfds)) {
printf("reading stdin!\n");
outgoingmsgrc = getstdin(NULL, outgoingmsg, sizeof(outgoingmsg));
@@ -159,7 +159,7 @@ int main(int argc, char *argv[]) {
}
// loop through all the results and connect to the first we can
- for(p = servinfo; p != NULL; p = p->ai_next) {
+ for (p = servinfo; p != NULL; p = p->ai_next) {
if ((sockfd = socket(p->ai_family, p->ai_socktype, p->ai_protocol)) == -1) {
perror("bouncer-server: socket");
continue;