Ignore:
Timestamp:
2007-12-05T01:30:50Z (16 years ago)
Author:
ulim <a.sporto+bee@…>
Branches:
master
Children:
dc0ba9c
Parents:
dce3903 (diff), 793cc25 (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:

merges from upstream/release

ulim 2007-12-04 Follow rename of jabber_chat_by_jid from upstrem

ulim 2007-12-04 Merged in current devel
Wilmer van der Gaast 2007-12-02 Imported setuid() patch from Simo Leone <simo@archlinux...> with some
Wilmer van der Gaast 2007-12-02 Forgot to return something in jabber_chat_join_failed().
Wilmer van der Gaast 2007-12-02 Merging a change I should've pulled before committing three other changes.
Wilmer van der Gaast 2007-12-02 Added charset checks on incoming msgs (from the IRC side) to prevent possible
Wilmer van der Gaast 2007-12-02 Handling of presence-error packets (only useful for groupchats now), moved
Wilmer van der Gaast 2007-12-02 Defining DEBUG via CFLAGS so that it'll always be there, even when a file
ulim 2007-12-04 Jabber file transfer now also with sending! You can't use a proxy yet when
Wilmer van der Gaast 2007-12-02 Removed retarded printf() (ARGH) and moved the event handling handling of
Wilmer van der Gaast 2007-11-29 printf() in daemons considered harmful.
Wilmer van der Gaast 2007-11-28 Fixed the epoll+ForkDaemon combination. The libevent event handling

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/jabber/jabber_util.c

    rdce3903 r8076ec0  
    183183                return FALSE;
    184184        }
     185}
     186
     187xt_status jabber_cache_handle_packet( struct im_connection *ic, struct xt_node *node )
     188{
     189        struct jabber_data *jd = ic->proto_data;
     190        struct jabber_cache_entry *entry;
     191        char *s;
     192       
     193        if( ( s = xt_find_attr( node, "id" ) ) == NULL ||
     194            strncmp( s, jd->cached_id_prefix, strlen( jd->cached_id_prefix ) ) != 0 )
     195        {
     196                /* Silently ignore it, without an ID (or a non-cache
     197                   ID) we don't know how to handle the packet and we
     198                   probably don't have to. */
     199                return XT_HANDLED;
     200        }
     201       
     202        entry = g_hash_table_lookup( jd->node_cache, s );
     203       
     204        if( entry == NULL )
     205        {
     206                imcb_log( ic, "WARNING: Received %s-%s packet with unknown/expired ID %s!",
     207                              node->name, xt_find_attr( node, "type" ) ? : "(no type)", s );
     208        }
     209        else if( entry->func )
     210        {
     211                return entry->func( ic, node, entry->node );
     212        }
     213       
     214        return XT_HANDLED;
    185215}
    186216
     
    595625}
    596626
    597 struct groupchat *jabber_chat_by_name( struct im_connection *ic, const char *name )
    598 {
    599         char *normalized = jabber_normalize( name );
    600         struct groupchat *ret;
    601         struct jabber_chat *jc;
    602        
    603         for( ret = ic->groupchats; ret; ret = ret->next )
    604         {
    605                 jc = ret->data;
    606                 if( strcmp( normalized, jc->name ) == 0 )
    607                         break;
    608         }
    609         g_free( normalized );
    610        
    611         return ret;
    612 }
    613 
    614627time_t jabber_get_timestamp( struct xt_node *xt )
    615628{
     
    663676struct jabber_error *jabber_error_parse( struct xt_node *node, char *xmlns )
    664677{
    665         struct jabber_error *err = g_new0( struct jabber_error, 1 );
     678        struct jabber_error *err;
    666679        struct xt_node *c;
    667680        char *s;
    668681       
     682        if( node == NULL )
     683                return NULL;
     684       
     685        err = g_new0( struct jabber_error, 1 );
    669686        err->type = xt_find_attr( node, "type" );
    670687       
Note: See TracChangeset for help on using the changeset viewer.