Changeset d52111a


Ignore:
Timestamp:
2007-12-12T21:36:33Z (17 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
30ce1ce
Parents:
0f47613
Message:

Fixed sockerr_again() usage in Jabber module to (hopefully) fix a 100% CPU
usage bug.

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • lib/misc.c

    r0f47613 rd52111a  
    4444#include <resolv.h>
    4545#endif
     46
     47#include "ssl_client.h"
    4648
    4749void strip_linefeed(gchar *text)
     
    591593        return g_string_free( ret, FALSE );
    592594}
     595
     596gboolean ssl_sockerr_again( void *ssl )
     597{
     598        if( ssl )
     599                return ssl_errno == SSL_AGAIN;
     600        else
     601                return sockerr_again();
     602}
  • lib/misc.h

    r0f47613 rd52111a  
    6666G_MODULE_EXPORT char *word_wrap( char *msg, int line_len );
    6767
     68G_MODULE_EXPORT gboolean ssl_sockerr_again( void *ssl );
     69
    6870#endif
  • protocols/jabber/io.c

    r0f47613 rd52111a  
    120120                return TRUE;
    121121        }
    122         else if( st == 0 || ( st < 0 && !sockerr_again() ) )
     122        else if( st == 0 || ( st < 0 && !ssl_sockerr_again( jd->ssl ) ) )
    123123        {
    124124                /* Set fd to -1 to make sure we won't write to it anymore. */
     
    231231                }
    232232        }
    233         else if( st == 0 || ( st < 0 && !sockerr_again() ) )
     233        else if( st == 0 || ( st < 0 && !ssl_sockerr_again( jd->ssl ) ) )
    234234        {
    235235                closesocket( jd->fd );
Note: See TracChangeset for help on using the changeset viewer.