Imported Upstream version 2.7.1
This commit is contained in:
parent
a1fa151fc7
commit
0121794af9
451 changed files with 41339 additions and 10887 deletions
|
|
@ -325,9 +325,12 @@ int sendback(nut_ctype_t *client, const char *fmt, ...)
|
|||
|
||||
len = strlen(ans);
|
||||
|
||||
#ifdef WITH_SSL
|
||||
if (client->ssl) {
|
||||
res = ssl_write(client, ans, len);
|
||||
} else {
|
||||
} else
|
||||
#endif /* WITH_SSL */
|
||||
{
|
||||
res = write(client->sock_fd, ans, len);
|
||||
}
|
||||
|
||||
|
|
@ -503,9 +506,12 @@ static void client_readline(nut_ctype_t *client)
|
|||
char buf[SMALLBUF];
|
||||
int i, ret;
|
||||
|
||||
#ifdef WITH_SSL
|
||||
if (client->ssl) {
|
||||
ret = ssl_read(client, buf, sizeof(buf));
|
||||
} else {
|
||||
} else
|
||||
#endif /* WITH_SSL */
|
||||
{
|
||||
ret = read(client->sock_fd, buf, sizeof(buf));
|
||||
}
|
||||
|
||||
|
|
@ -642,6 +648,8 @@ static void upsd_cleanup(void)
|
|||
free(statepath);
|
||||
free(datapath);
|
||||
free(certfile);
|
||||
free(certname);
|
||||
free(certpasswd);
|
||||
|
||||
free(fds);
|
||||
free(handler);
|
||||
|
|
@ -1034,6 +1042,8 @@ int main(int argc, char **argv)
|
|||
mainloop();
|
||||
}
|
||||
|
||||
ssl_cleanup();
|
||||
|
||||
upslogx(LOG_INFO, "Signal %d: exiting", exit_flag);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue