void ServEcho(int sockfd) {
char buffer[MAXLINE];
int nread, nwrite;
- char debug[MAXLINE+20];
+ char debug[MAXLINE+30];
/* main loop, reading 0 char means client close connection */
while ( (nread = read(sockfd, buffer, MAXLINE)) != 0) {
if (nread < 0) {
}
if (debugging) {
buffer[nread] = 0;
- snprintf(debug, MAXLINE+20, "Letti %d byte, %s", nread, buffer);
+ snprintf(debug, MAXLINE+30, "Letti %d byte, %s", nread, buffer);
if (demonize) { /* daemon mode */
syslog(LOG_DEBUG, debug);
} else {
usage();
}
if ( rename(argv[optind], argv[optind+1]) ) {
- copy = strerror_r(errno, NULL, 0);
perror("cannot rename");
exit(1);
}