Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelortmann committed Jun 26, 2024
1 parent 845d443 commit 0c64610
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/mod/share.mod/share.c
Original file line number Diff line number Diff line change
Expand Up @@ -1239,21 +1239,21 @@ static void share_ufsend2(int idx, char *par)
debug2("share: share_ufsend2(): start: par = >%s< len = %i", par, len);
buf = nmalloc(len);
if ((len = b64_pton(par, buf, len)) < 0) {
putlog(LOG_BOTS, "*", "share: share_ufsend2(): error b64_pton()");
putlog(LOG_BOTS, "*", "Share: share_ufsend2(): error b64_pton()");
return;
}
debug1("share: share_ufsend2(): len = %i", len);
char template[] = "/tmp/shareXXXXXXXX";
int fd;
if ((fd = mkstemp(template)) < 0) {
putlog(LOG_BOTS, "*", "share: share_ufsend2(): error mkstemp(): %s", strerror(errno));
putlog(LOG_BOTS, "*", "Share: share_ufsend2(): error mkstemp(): %s", strerror(errno));
return;
}
if ((i = write(fd, buf, len)) != len) {
if (i < 0)
putlog(LOG_MISC, "*", "Share error: sare_ufsend2(): write(): %s", strerror(errno));
putlog(LOG_MISC, "*", "Share error: share_ufsend2(): write(): %s", strerror(errno));
else
putlog(LOG_MISC, "*", "share error: sare_ufsend2(): write(): Wrote %ld bytes instead of %i bytes.", (long) i, len);
putlog(LOG_MISC, "*", "Share error: share_ufsend2(): write(): Wrote %ld bytes instead of %i bytes.", (long) i, len);
return;
}
close(fd);
Expand All @@ -1266,7 +1266,7 @@ static void share_ufsend2(int idx, char *par)
strcpy(dcc[idx].host, dcc[idx].nick);
finish_share(idx);
strcpy(dcc[idx].host, host);
debug0("share: share_ufsend2(): end");
debug0("Share: share_ufsend2(): end");
}

/* us <ip> <port> <length>
Expand Down

0 comments on commit 0c64610

Please sign in to comment.