Changeset b308cf9 for protocols/jabber


Ignore:
Timestamp:
2010-06-05T23:21:02Z (15 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
1fdb0a4
Parents:
3ab1d31 (diff), e774815 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merging libpurple branch into killerbee. It's fairly usable already, and
Debian packaging is now properly separated. This also picks up a load of
stuff from mainline it seems.

Location:
protocols/jabber
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • protocols/jabber/Makefile

    r3ab1d31 rb308cf9  
    88
    99-include ../../Makefile.settings
     10ifdef SRCDIR
     11SRCDIR := $(SRCDIR)protocols/jabber/
     12endif
    1013
    1114# [SH] Program variables
     
    3336$(objects): ../../Makefile.settings Makefile
    3437
    35 $(objects): %.o: %.c
     38$(objects): %.o: $(SRCDIR)%.c
    3639        @echo '*' Compiling $<
    3740        @$(CC) -c $(CFLAGS) $< -o $@
  • protocols/jabber/conference.c

    r3ab1d31 rb308cf9  
    272272                }
    273273               
    274                 if( bud != jc->me )
    275                 {
     274                if( bud != jc->me && bud->flags & JBFLAG_IS_ANONYMOUS )
     275                {
     276                        /* If JIDs are anonymized, add them to the local
     277                           list for the duration of this chat. */
    276278                        imcb_add_buddy( ic, bud->ext_jid, NULL );
    277279                        imcb_buddy_nick_hint( ic, bud->ext_jid, bud->resource );
  • protocols/jabber/io.c

    r3ab1d31 rb308cf9  
    6464                   most cases it probably won't be necessary.) */
    6565                if( ( ret = jabber_write_queue( ic ) ) && jd->tx_len > 0 )
    66                         jd->w_inpa = b_input_add( jd->fd, GAIM_INPUT_WRITE, jabber_write_callback, ic );
     66                        jd->w_inpa = b_input_add( jd->fd, B_EV_IO_WRITE, jabber_write_callback, ic );
    6767        }
    6868        else
     
    504504       
    505505        if( jd->r_inpa <= 0 )
    506                 jd->r_inpa = b_input_add( jd->fd, GAIM_INPUT_READ, jabber_read_callback, ic );
     506                jd->r_inpa = b_input_add( jd->fd, B_EV_IO_READ, jabber_read_callback, ic );
    507507       
    508508        greet = g_strdup_printf( "%s<stream:stream to=\"%s\" xmlns=\"jabber:client\" "
  • protocols/jabber/jabber_util.c

    r3ab1d31 rb308cf9  
    671671time_t jabber_get_timestamp( struct xt_node *xt )
    672672{
    673         struct tm tp, utc;
    674673        struct xt_node *c;
    675         time_t res, tres;
    676674        char *s = NULL;
     675        struct tm tp;
    677676       
    678677        for( c = xt->children; ( c = xt_find_node( c, "x" ) ); c = c->next )
     
    692691        tp.tm_year -= 1900;
    693692        tp.tm_mon --;
    694         tp.tm_isdst = -1; /* GRRRRRRRRRRR */
    695        
    696         res = mktime( &tp );
    697         /* Problem is, mktime() just gave us the GMT timestamp for the
    698            given local time... While the given time WAS NOT local. So
    699            we should fix this now.
    700        
    701            Now I could choose between messing with environment variables
    702            (kludgy) or using timegm() (not portable)... Or doing the
    703            following, which I actually prefer... */
    704         gmtime_r( &res, &utc );
    705         utc.tm_isdst = -1; /* Once more: GRRRRRRRRRRRRRRRRRR!!! */
    706         if( utc.tm_hour == tp.tm_hour && utc.tm_min == tp.tm_min )
    707                 /* Sweet! We're in UTC right now... */
    708                 return res;
    709        
    710         tres = mktime( &utc );
    711         res += res - tres;
    712        
    713         /* Yes, this is a hack. And it will go wrong around DST changes.
    714            BUT this is more likely to be threadsafe than messing with
    715            environment variables, and possibly more portable... */
    716        
    717         return res;
     693       
     694        return mktime_utc( &tp );
    718695}
    719696
  • protocols/jabber/message.c

    r3ab1d31 rb308cf9  
    8080                if( type && strcmp( type, "headline" ) == 0 )
    8181                {
    82                         c = xt_find_node( node->children, "subject" );
    83                         g_string_append_printf( fullmsg, "Headline: %s\n", c && c->text_len > 0 ? c->text : "" );
     82                        if( ( c = xt_find_node( node->children, "subject" ) ) && c->text_len > 0 )
     83                                g_string_append_printf( fullmsg, "Headline: %s\n", c->text );
    8484                       
    8585                        /* <x xmlns="jabber:x:oob"><url>http://....</url></x> can contain a URL, it seems. */
  • protocols/jabber/s5bytestream.c

    r3ab1d31 rb308cf9  
    406406                        bt->phase = BS_PHASE_CONNECTED;
    407407                       
    408                         bt->tf->watch_out = b_input_add( fd, GAIM_INPUT_WRITE, jabber_bs_recv_handshake, bt );
     408                        bt->tf->watch_out = b_input_add( fd, B_EV_IO_WRITE, jabber_bs_recv_handshake, bt );
    409409
    410410                        /* since it takes forever(3mins?) till connect() fails on itself we schedule a timeout */
     
    433433                        bt->phase = BS_PHASE_REQUEST;
    434434
    435                         bt->tf->watch_in = b_input_add( fd, GAIM_INPUT_READ, jabber_bs_recv_handshake, bt );
     435                        bt->tf->watch_in = b_input_add( fd, B_EV_IO_READ, jabber_bs_recv_handshake, bt );
    436436
    437437                        bt->tf->watch_out = 0;
     
    590590
    591591        tf->ft->data = tf;
    592         tf->watch_in = b_input_add( tf->fd, GAIM_INPUT_READ, jabber_bs_recv_read, bt );
     592        tf->watch_in = b_input_add( tf->fd, B_EV_IO_READ, jabber_bs_recv_read, bt );
    593593        tf->ft->write_request = jabber_bs_recv_write_request;
    594594
     
    632632                if( ( ret == -1 ) && ( errno == EAGAIN ) )
    633633                {
    634                         tf->watch_in = b_input_add( tf->fd, GAIM_INPUT_READ, jabber_bs_recv_read, bt );
     634                        tf->watch_in = b_input_add( tf->fd, B_EV_IO_READ, jabber_bs_recv_read, bt );
    635635                        return FALSE;
    636636                }
     
    708708                imcb_file_finished( ft );
    709709        else
    710                 bt->tf->watch_out = b_input_add( tf->fd, GAIM_INPUT_WRITE, jabber_bs_send_can_write, bt );
     710                bt->tf->watch_out = b_input_add( tf->fd, B_EV_IO_WRITE, jabber_bs_send_can_write, bt );
    711711               
    712712        return TRUE;
     
    919919                                bt->streamhosts = g_slist_append( bt->streamhosts, sh );
    920920
    921                                 bt->tf->watch_in = b_input_add( tf->fd, GAIM_INPUT_READ, jabber_bs_send_handshake, bt );
     921                                bt->tf->watch_in = b_input_add( tf->fd, B_EV_IO_READ, jabber_bs_send_handshake, bt );
    922922                                bt->connect_timeout = b_timeout_add( JABBER_BS_LISTEN_TIMEOUT * 1000, jabber_bs_connect_timeout, bt );
    923923                        } else {
     
    10561056                        bt->phase = BS_PHASE_CONNECTED;
    10571057
    1058                         bt->tf->watch_in = b_input_add( fd, GAIM_INPUT_READ, jabber_bs_send_handshake, bt );
     1058                        bt->tf->watch_in = b_input_add( fd, B_EV_IO_READ, jabber_bs_send_handshake, bt );
    10591059                        return FALSE;
    10601060                }
Note: See TracChangeset for help on using the changeset viewer.