git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Usermode - Switched to the POSIX read()/write() argument order
[tpg/acess2.git]
/
Usermode
/
Applications
/
irc_src
/
main.c
diff --git
a/Usermode/Applications/irc_src/main.c
b/Usermode/Applications/irc_src/main.c
index
952da4e
..
a08553a
100644
(file)
--- a/
Usermode/Applications/irc_src/main.c
+++ b/
Usermode/Applications/irc_src/main.c
@@
-578,6
+578,10
@@
void ParseServerLine(tServer *Server, char *Line)
break;
\r
}
\r
}
\r
break;
\r
}
\r
}
\r
+ else if( strcmp(cmd, "PING") == 0 )
\r
+ {
\r
+ writef(Server->FD, "PONG %s\n", gsHostname);
\r
+ }
\r
else if( strcmp(cmd, "NOTICE") == 0 )
\r
{
\r
char *class, *message;
\r
else if( strcmp(cmd, "NOTICE") == 0 )
\r
{
\r
char *class, *message;
\r
@@
-643,7
+647,7
@@
int ProcessIncoming(tServer *Server)
{
\r
#endif
\r
// Read data
\r
{
\r
#endif
\r
// Read data
\r
- len = read(Server->FD,
BUFSIZ - Server->ReadPos, &Server->InBuf[Server->ReadPos]
);
\r
+ len = read(Server->FD,
&Server->InBuf[Server->ReadPos], BUFSIZ - Server->ReadPos
);
\r
if( len == -1 ) {
\r
return -1;
\r
}
\r
if( len == -1 ) {
\r
return -1;
\r
}
\r
@@
-697,7
+701,7
@@
int writef(int FD, const char *Format, ...)
vsnprintf(buf, len+1, Format, args);
\r
va_end(args);
\r
\r
vsnprintf(buf, len+1, Format, args);
\r
va_end(args);
\r
\r
- return write(FD,
len, buf
);
\r
+ return write(FD,
buf, len
);
\r
}
\r
}
\r
\r
}
\r
}
\r
\r
UCC
git Repository :: git.ucc.asn.au