Changeset 110

Show
Ignore:
Timestamp:
21/10/08 14:02:45 (3 months ago)
Author:
smoku
Message:

Presence handling improvements.

Location:
jggtrans/src
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • jggtrans/src/sessions.c

    r102 r110  
    10051005 
    10061006        if (c->blocked) return GG_USER_BLOCKED; 
    1007         if (c->got_online || c->subscribe==SUB_FROM || c->subscribe==SUB_BOTH) notify_type|=GG_USER_NORMAL; 
    1008         if (c->got_probe || c->subscribe==SUB_TO || c->subscribe==SUB_BOTH) notify_type|=GG_USER_OFFLINE; 
     1007        if (c->got_online || c->subscribe==SUB_FROM || c->subscribe==SUB_BOTH) return GG_USER_NORMAL; 
     1008        if (c->got_probe || c->subscribe==SUB_TO || c->subscribe==SUB_BOTH) return GG_USER_OFFLINE; 
    10091009 
    10101010        return notify_type; 
     
    10221022        add=new_notify_type&(~c->gg_notify_type); 
    10231023         
    1024         if (del) gg_remove_notify_ex(s->ggs,c->uin,del); 
    1025         if (add) gg_add_notify_ex(s->ggs,c->uin,add); 
     1024        if (del) gg_remove_notify_ex(s->ggs,c->uin,new_notify_type); 
     1025        if (add) gg_add_notify_ex(s->ggs,c->uin,new_notify_type); 
    10261026 
    10271027        c->gg_notify_type=new_notify_type; 
     
    10451045        for(it=g_list_first(s->user->contacts);it;it=it->next){ 
    10461046                Contact *c=(Contact *)it->data; 
    1047                 userlist[i]=c->uin; 
    10481047                c->gg_notify_type=compute_notify_type(c); 
    1049                 types[i]=c->gg_notify_type; 
    1050                 i++;     
     1048                if(c->gg_notify_type){ 
     1049                        userlist[i]=c->uin; 
     1050                        types[i]=c->gg_notify_type; 
     1051                        i++; 
     1052                } 
    10511053        } 
    10521054 
  • jggtrans/src/users.h

    r34 r110  
    3737        gboolean ignored; 
    3838        gboolean blocked; 
    39         SubscriptionType subscribe; 
     39        SubscriptionType subscribe;     /* copy of item s10n state from user roster */ 
    4040 
    41         gboolean got_online; 
    42         gboolean got_probe; 
     41        gboolean got_online;            /* user sent direct available presence to this user */ 
     42        gboolean got_probe;                     /* user server sent presence probe to this user */ 
    4343 
    4444        int gg_notify_type; 
     
    6262        char *locale; 
    6363        char * status; 
    64         SubscriptionType subscribe; 
     64        SubscriptionType subscribe;     /* copy of transport item s10n state from user roster */ 
    6565 
    6666        int confirmed;