void finish_transfer(struct ftran * const f)
{
char finished[] = "226 Transfer complete.\r\n";
- if (send(f->owner->sock, finished, sizeof(finished), 0) == -1 && errno == EPIPE) {
+ if (send(f->owner->sock, finished, strlen(finished), 0) == -1 && errno == EPIPE) {
destroy_conn(f->owner);
return;
}
memcpy(&(c->addr), &tempaddr, sizeof(struct sockaddr));
#endif
- if (send(tempsock, hello, sizeof(hello), 0) == -1 && errno == EPIPE)
+ if (send(tempsock, hello, strlen(hello), 0) == -1 && errno == EPIPE)
destroy_conn(c);
}
}