"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/response.c" between
proftpd-1.3.6b.tar.gz and proftpd-1.3.6c.tar.gz

About: ProFTPD is a highly configurable FTP server software (with FTPS and SFTP support).

response.c  (proftpd-1.3.6b):response.c  (proftpd-1.3.6c)
skipping to change at line 222 skipping to change at line 222
void pr_response_add_err(const char *numeric, const char *fmt, ...) { void pr_response_add_err(const char *numeric, const char *fmt, ...) {
pr_response_t *resp = NULL, **head = NULL; pr_response_t *resp = NULL, **head = NULL;
int res; int res;
va_list msg; va_list msg;
if (fmt == NULL) { if (fmt == NULL) {
return; return;
} }
if (resp_pool == NULL) {
pr_trace_msg(trace_channel, 1,
"no response pool set, ignoring added %s error response", numeric);
return;
}
va_start(msg, fmt); va_start(msg, fmt);
res = vsnprintf(resp_buf, sizeof(resp_buf), fmt, msg); res = vsnprintf(resp_buf, sizeof(resp_buf), fmt, msg);
va_end(msg); va_end(msg);
resp_buf[sizeof(resp_buf) - 1] = '\0'; resp_buf[sizeof(resp_buf) - 1] = '\0';
resp = (pr_response_t *) pcalloc(resp_pool, sizeof(pr_response_t)); resp = (pr_response_t *) pcalloc(resp_pool, sizeof(pr_response_t));
resp->num = (numeric ? pstrdup(resp_pool, numeric) : NULL); resp->num = (numeric ? pstrdup(resp_pool, numeric) : NULL);
resp->msg = pstrndup(resp_pool, resp_buf, res); resp->msg = pstrndup(resp_pool, resp_buf, res);
skipping to change at line 275 skipping to change at line 281
void pr_response_add(const char *numeric, const char *fmt, ...) { void pr_response_add(const char *numeric, const char *fmt, ...) {
pr_response_t *resp = NULL, **head = NULL; pr_response_t *resp = NULL, **head = NULL;
int res; int res;
va_list msg; va_list msg;
if (fmt == NULL) { if (fmt == NULL) {
return; return;
} }
if (resp_pool == NULL) {
pr_trace_msg(trace_channel, 1,
"no response pool set, ignoring added %s response", numeric);
return;
}
va_start(msg, fmt); va_start(msg, fmt);
res = vsnprintf(resp_buf, sizeof(resp_buf), fmt, msg); res = vsnprintf(resp_buf, sizeof(resp_buf), fmt, msg);
va_end(msg); va_end(msg);
resp_buf[sizeof(resp_buf) - 1] = '\0'; resp_buf[sizeof(resp_buf) - 1] = '\0';
resp = (pr_response_t *) pcalloc(resp_pool, sizeof(pr_response_t)); resp = (pr_response_t *) pcalloc(resp_pool, sizeof(pr_response_t));
resp->num = (numeric ? pstrdup(resp_pool, numeric) : NULL); resp->num = (numeric ? pstrdup(resp_pool, numeric) : NULL);
resp->msg = pstrndup(resp_pool, resp_buf, res); resp->msg = pstrndup(resp_pool, resp_buf, res);
 End of changes. 2 change blocks. 
0 lines changed or deleted 12 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)