Project "Tuxbox-GIT: apps": The branch, master has been updated via 8cade3ffa8084dba2171ab4cabb90065fb692659 (commit) via 59788b0d26762fc248c5cf8610d5895d441dd800 (commit) from a06c2c6403315904a2f803ab6417c4c554d072bf (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 8cade3ffa8084dba2171ab4cabb90065fb692659 Author: GetAway <get-a...@t-online.de> Date: Thu Oct 30 16:58:20 2014 +0100 tuxmail: add utf8_to_latin1 encoding version bump 1.56B Signed-off-by: GetAway <get-a...@t-online.de> diff --git a/tuxbox/plugins/tuxmail/tuxmail.c b/tuxbox/plugins/tuxmail/tuxmail.c index 42abecc..043bc73 100644 --- a/tuxbox/plugins/tuxmail/tuxmail.c +++ b/tuxbox/plugins/tuxmail/tuxmail.c @@ -858,7 +858,7 @@ int RenderChar(FT_ULong currentchar, int sx, int sy, int ex, int color) * GetStringLen ******************************************************************************/ -int GetStringLen(unsigned char *string) +int GetStringLen(char *string) { int stringlen = 0; @@ -881,9 +881,12 @@ int GetStringLen(unsigned char *string) * RenderString ******************************************************************************/ -void RenderString(unsigned char *string, int sx, int sy, int maxwidth, int layout, int size, int color) +void RenderString(char *string, int sx, int sy, int maxwidth, int layout, int size, int color) { int stringlen, ex, charwidth; + char rstr[256]={0}, *rptr=rstr; + + strcpy(rstr,string); // set size @@ -933,15 +936,59 @@ void RenderString(unsigned char *string, int sx, int sy, int maxwidth, int layou ex = sx + maxwidth; - while(*string != '\0') + while(*rptr != '\0') { - if((charwidth = RenderChar(*string, sx, sy, ex, color)) == -1) + int uml = 0; + switch(*rptr) /* skip Umlauts */ + { + case '\xc4': + case '\xd6': + case '\xdc': + case '\xe4': + case '\xf6': + case '\xfc': + case '\xdf': uml=1; break; + } + if (uml == 0) + { + // UTF8_to_Latin1 encoding + if (((*rptr) & 0xf0) == 0xf0) /* skip (can't be encoded in Latin1) */ + { + rptr++; + if ((*rptr) == 0) + *rptr='\x3f'; // ? question mark + rptr++; + if ((*rptr) == 0) + *rptr='\x3f'; + rptr++; + if ((*rptr) == 0) + *rptr='\x3f'; + } + else if (((*rptr) & 0xe0) == 0xe0) /* skip (can't be encoded in Latin1) */ + { + rptr++; + if ((*rptr) == 0) + *rptr='\x3f'; + rptr++; + if ((*rptr) == 0) + *rptr='\x3f'; + } + else if (((*rptr) & 0xc0) == 0xc0) + { + char c = (((*rptr) & 3) << 6); + rptr++; + if ((*rptr) == 0) + *rptr='\x3f'; + *rptr = (c | ((*rptr) & 0x3f)); + } + } + if((charwidth = RenderChar(*rptr, sx, sy, ex, color)) == -1) { return; /* string > maxwidth */ } sx += charwidth; - string++; + rptr++; } } @@ -3759,7 +3806,7 @@ void SaveAndReloadDB(int iSave) void plugin_exec(PluginParam *par) { - char cvs_revision[] = "$Revision: 1.56A $"; + char cvs_revision[] = "$Revision: 1.56B $"; int loop, account, mailindex; FILE *fd_run; FT_Error error; commit 59788b0d26762fc248c5cf8610d5895d441dd800 Author: GetAway <get-a...@t-online.de> Date: Mon Oct 27 20:42:02 2014 +0100 tuxmaild: force tls handshake pump version 1.51B Signed-off-by: GetAway <get-a...@t-online.de> diff --git a/tuxbox/plugins/tuxmail/daemon/tuxmaild.c b/tuxbox/plugins/tuxmail/daemon/tuxmaild.c index bd8de6a..5069113 100644 --- a/tuxbox/plugins/tuxmail/daemon/tuxmaild.c +++ b/tuxbox/plugins/tuxmail/daemon/tuxmaild.c @@ -1539,6 +1539,8 @@ int SendPOPCommand(int command, char *param, int ssl) ERR_print_errors_fp (stderr); return 0; } + SSL_CTX_set_options(c->sslContext, SSL_OP_NO_SSLv2); + SSL_CTX_set_options(c->sslContext, SSL_OP_NO_SSLv3); c->sslHandle = SSL_new (c->sslContext); if (c->sslHandle == NULL) { @@ -2058,6 +2060,8 @@ int SendIMAPCommand(int command, char *param, char *param2, int ssl) ERR_print_errors_fp (stderr); return 0; } + SSL_CTX_set_options(c->sslContext, SSL_OP_NO_SSLv2); + SSL_CTX_set_options(c->sslContext, SSL_OP_NO_SSLv3); c->sslHandle = SSL_new (c->sslContext); if (c->sslHandle == NULL) { @@ -2689,6 +2693,8 @@ int SendSMTPCommand(int command, char *param, int ssl) ERR_print_errors_fp (stderr); return 0; } + SSL_CTX_set_options(c->sslContext, SSL_OP_NO_SSLv2); + SSL_CTX_set_options(c->sslContext, SSL_OP_NO_SSLv3); c->sslHandle = SSL_new (c->sslContext); if (c->sslHandle == NULL) { @@ -4794,7 +4800,7 @@ void SigHandler(int signal) int main(int argc, char **argv) { - char cvs_revision[] = "$Revision: 1.51A $"; + char cvs_revision[] = "$Revision: 1.51B $"; int param, nodelay = 0, account, mailstatus, unread_mailstatus; pthread_t thread_id; void *thread_result = 0; ----------------------------------------------------------------------- Summary of changes: tuxbox/plugins/tuxmail/daemon/tuxmaild.c | 8 ++++- tuxbox/plugins/tuxmail/tuxmail.c | 59 +++++++++++++++++++++++++++--- 2 files changed, 60 insertions(+), 7 deletions(-) -- Tuxbox-GIT: apps ------------------------------------------------------------------------------ _______________________________________________ Tuxbox-cvs-commits mailing list Tuxbox-cvs-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tuxbox-cvs-commits