mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-08 17:13:56 +00:00
Fixed compiler warning
SVN revision: 2238
This commit is contained in:
parent
bf0f190d13
commit
af3344aeaa
24
src/elogd.c
24
src/elogd.c
@ -421,7 +421,7 @@ char *loc(char *orig);
|
|||||||
void strencode(char *text);
|
void strencode(char *text);
|
||||||
void strencode_nouml(char *text);
|
void strencode_nouml(char *text);
|
||||||
int scan_attributes(char *logbook);
|
int scan_attributes(char *logbook);
|
||||||
int is_inline_attachment(LOGBOOK *lbs, char *encoding, int message_id, char *text, int i, char *att);
|
int is_inline_attachment(char *encoding, int message_id, char *text, int i, char *att);
|
||||||
int setgroup(char *str);
|
int setgroup(char *str);
|
||||||
int setuser(char *str);
|
int setuser(char *str);
|
||||||
int setegroup(char *str);
|
int setegroup(char *str);
|
||||||
@ -3455,7 +3455,7 @@ void check_config()
|
|||||||
|
|
||||||
/*-------------------------------------------------------------------*/
|
/*-------------------------------------------------------------------*/
|
||||||
|
|
||||||
void retrieve_domain(LOGBOOK * lbs, char *ret, int size)
|
void retrieve_domain(char *ret, int size)
|
||||||
{
|
{
|
||||||
char smtp_host[80];
|
char smtp_host[80];
|
||||||
|
|
||||||
@ -5635,7 +5635,7 @@ void replace_inline_img(LOGBOOK * lbs, char *str)
|
|||||||
pn++;
|
pn++;
|
||||||
if (*pn == '>')
|
if (*pn == '>')
|
||||||
pn++;
|
pn++;
|
||||||
retrieve_domain(lbs, domain, sizeof(domain));
|
retrieve_domain(domain, sizeof(domain));
|
||||||
sprintf(p, "<img border=\"0\" src=\"cid:att%d@%s\">", index, domain);
|
sprintf(p, "<img border=\"0\" src=\"cid:att%d@%s\">", index, domain);
|
||||||
memmove(p + strlen(p), pn, strlen(pn) + 1);
|
memmove(p + strlen(p), pn, strlen(pn) + 1);
|
||||||
|
|
||||||
@ -6271,7 +6271,7 @@ void rsputs_elcode(LOGBOOK * lbs, BOOL email_notify, const char *str)
|
|||||||
/* replace elog:x/x for images */
|
/* replace elog:x/x for images */
|
||||||
if (strnieq(attrib, "elog:", 5)) {
|
if (strnieq(attrib, "elog:", 5)) {
|
||||||
if (email_notify) {
|
if (email_notify) {
|
||||||
retrieve_domain(lbs, domain, sizeof(domain));
|
retrieve_domain(domain, sizeof(domain));
|
||||||
sprintf(hattrib, "cid:att%d@%s", m, domain);
|
sprintf(hattrib, "cid:att%d@%s", m, domain);
|
||||||
} else {
|
} else {
|
||||||
if (email_notify)
|
if (email_notify)
|
||||||
@ -17383,7 +17383,7 @@ void display_line(LOGBOOK * lbs, int message_id, int number, char *mode, int exp
|
|||||||
if (show_attachments && attachment[index][0]) {
|
if (show_attachments && attachment[index][0]) {
|
||||||
|
|
||||||
/* check if attachment is inlined */
|
/* check if attachment is inlined */
|
||||||
if (is_inline_attachment(lbs, encoding, message_id, text, index, attachment[index]))
|
if (is_inline_attachment(encoding, message_id, text, index, attachment[index]))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
strlcpy(str, attachment[index], sizeof(str));
|
strlcpy(str, attachment[index], sizeof(str));
|
||||||
@ -20841,7 +20841,7 @@ void format_email_attachments(LOGBOOK * lbs, int message_id, int attachment_type
|
|||||||
if (att_file[index][0] == 0)
|
if (att_file[index][0] == 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
is_inline = is_inline_attachment(lbs, getparam("encoding"), message_id,
|
is_inline = is_inline_attachment(getparam("encoding"), message_id,
|
||||||
getparam("text"), index, att_file[index]);
|
getparam("text"), index, att_file[index]);
|
||||||
if (attachment_type == 1 && is_inline)
|
if (attachment_type == 1 && is_inline)
|
||||||
continue;
|
continue;
|
||||||
@ -20874,7 +20874,7 @@ void format_email_attachments(LOGBOOK * lbs, int message_id, int attachment_type
|
|||||||
strlcat(mail_text, "Content-Transfer-Encoding: BASE64\r\n", size);
|
strlcat(mail_text, "Content-Transfer-Encoding: BASE64\r\n", size);
|
||||||
|
|
||||||
if (content_id) {
|
if (content_id) {
|
||||||
retrieve_domain(lbs, domain, sizeof(domain));
|
retrieve_domain(domain, sizeof(domain));
|
||||||
snprintf(mail_text + strlen(mail_text), size - strlen(mail_text) - 1, "Content-ID: <att%d@%s>\r\n",
|
snprintf(mail_text + strlen(mail_text), size - strlen(mail_text) - 1, "Content-ID: <att%d@%s>\r\n",
|
||||||
index, domain);
|
index, domain);
|
||||||
snprintf(mail_text + strlen(mail_text), size - strlen(mail_text) - 1,
|
snprintf(mail_text + strlen(mail_text), size - strlen(mail_text) - 1,
|
||||||
@ -21368,7 +21368,7 @@ int compose_email(LOGBOOK * lbs, char *rcpt_to, char *mail_to, int message_id,
|
|||||||
n_attachments = 0;
|
n_attachments = 0;
|
||||||
if (att_file)
|
if (att_file)
|
||||||
for (i = 0; att_file[i][0] && i < MAX_ATTACHMENTS; i++) {
|
for (i = 0; att_file[i][0] && i < MAX_ATTACHMENTS; i++) {
|
||||||
if ((mail_encoding & 6) == 0 || !is_inline_attachment(lbs, encoding, message_id,
|
if ((mail_encoding & 6) == 0 || !is_inline_attachment(encoding, message_id,
|
||||||
getparam("text"), i, att_file[i]))
|
getparam("text"), i, att_file[i]))
|
||||||
n_attachments++;
|
n_attachments++;
|
||||||
}
|
}
|
||||||
@ -22818,7 +22818,7 @@ void copy_to(LOGBOOK * lbs, int src_id, char *dest_logbook, int move, int orig_i
|
|||||||
|
|
||||||
/*------------------------------------------------------------------*/
|
/*------------------------------------------------------------------*/
|
||||||
|
|
||||||
int is_inline_attachment(LOGBOOK *lbs, char *encoding, int message_id, char *text, int i, char *att)
|
int is_inline_attachment(char *encoding, int message_id, char *text, int i, char *att)
|
||||||
{
|
{
|
||||||
char str[256], att_enc[256], domain[256];
|
char str[256], att_enc[256], domain[256];
|
||||||
|
|
||||||
@ -22836,7 +22836,7 @@ int is_inline_attachment(LOGBOOK *lbs, char *encoding, int message_id, char *tex
|
|||||||
att_enc[13] = '/';
|
att_enc[13] = '/';
|
||||||
if (stristr(text, att_enc))
|
if (stristr(text, att_enc))
|
||||||
return 1;
|
return 1;
|
||||||
retrieve_domain(lbs, domain, sizeof(domain));
|
retrieve_domain(domain, sizeof(domain));
|
||||||
sprintf(str, "cid:att%d@%s", i, domain);
|
sprintf(str, "cid:att%d@%s", i, domain);
|
||||||
if (stristr(text, str))
|
if (stristr(text, str))
|
||||||
return 1;
|
return 1;
|
||||||
@ -23812,7 +23812,7 @@ void show_elog_entry(LOGBOOK * lbs, char *dec_path, char *command)
|
|||||||
att_inline[i] = 0;
|
att_inline[i] = 0;
|
||||||
att_hide[i] = getcfg(lbs->name, "Show attachments", str, sizeof(str)) && atoi(str) == 0;
|
att_hide[i] = getcfg(lbs->name, "Show attachments", str, sizeof(str)) && atoi(str) == 0;
|
||||||
|
|
||||||
if (is_inline_attachment(lbs, encoding, message_id, text, i, attachment[i]))
|
if (is_inline_attachment(encoding, message_id, text, i, attachment[i]))
|
||||||
att_inline[i] = 1;
|
att_inline[i] = 1;
|
||||||
|
|
||||||
if (attachment[i][0])
|
if (attachment[i][0])
|
||||||
@ -23865,7 +23865,7 @@ void show_elog_entry(LOGBOOK * lbs, char *dec_path, char *command)
|
|||||||
strcpy(file_enc, attachment[index] + 14);
|
strcpy(file_enc, attachment[index] + 14);
|
||||||
url_encode(file_enc, sizeof(file_enc)); /* for file names with special characters like "+" */
|
url_encode(file_enc, sizeof(file_enc)); /* for file names with special characters like "+" */
|
||||||
if (email) {
|
if (email) {
|
||||||
retrieve_domain(lbs, domain, sizeof(domain));
|
retrieve_domain(domain, sizeof(domain));
|
||||||
sprintf(ref, "cid:att%d@%s", index, domain);
|
sprintf(ref, "cid:att%d@%s", index, domain);
|
||||||
} else
|
} else
|
||||||
sprintf(ref, "%s/%s", str, file_enc);
|
sprintf(ref, "%s/%s", str, file_enc);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user