comparison libgaim/protocols/jabber/jabber.c @ 14391:6e89bfd2b33f

[gaim-migrate @ 17098] I don't think PRPLs should need to make sure that proto_data is valid in the set_idle() callback. Some of my idle changes on the 23rd added that requirement. This removes the requirement to make things the way they were before. I'm also reverting SVN revision 17005 from faceprint and 17009 from marv_sf. Those revisions fixed the PRPLs so they wouldn't crash if set_idle() was called before the acocunt was fully connected. But that shouldn't be needed any more. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Thu, 31 Aug 2006 09:02:10 +0000
parents 8a2b571f9990
children 14fb08103914
comparison
equal deleted inserted replaced
14390:d4a26ada1971 14391:6e89bfd2b33f
1038 char *jabber_get_next_id(JabberStream *js) 1038 char *jabber_get_next_id(JabberStream *js)
1039 { 1039 {
1040 return g_strdup_printf("gaim%x", js->next_id++); 1040 return g_strdup_printf("gaim%x", js->next_id++);
1041 } 1041 }
1042 1042
1043 /* 1043
1044 static void jabber_idle_set(GaimConnection *gc, int idle) 1044 static void jabber_idle_set(GaimConnection *gc, int idle)
1045 { 1045 {
1046 JabberStream *js = gc->proto_data; 1046 JabberStream *js = gc->proto_data;
1047 1047
1048 js->idle = idle ? time(NULL) - idle : idle; 1048 js->idle = idle ? time(NULL) - idle : idle;
1049 } 1049 }
1050 */
1051 1050
1052 static const char *jabber_list_icon(GaimAccount *a, GaimBuddy *b) 1051 static const char *jabber_list_icon(GaimAccount *a, GaimBuddy *b)
1053 { 1052 {
1054 return "jabber"; 1053 return "jabber";
1055 } 1054 }
1846 jabber_message_send_im, /* send_im */ 1845 jabber_message_send_im, /* send_im */
1847 jabber_set_info, /* set_info */ 1846 jabber_set_info, /* set_info */
1848 jabber_send_typing, /* send_typing */ 1847 jabber_send_typing, /* send_typing */
1849 jabber_buddy_get_info, /* get_info */ 1848 jabber_buddy_get_info, /* get_info */
1850 jabber_presence_send, /* set_away */ 1849 jabber_presence_send, /* set_away */
1851 NULL, /* set_idle */ 1850 jabber_idle_set, /* set_idle */
1852 NULL, /* change_passwd */ 1851 NULL, /* change_passwd */
1853 jabber_roster_add_buddy, /* add_buddy */ 1852 jabber_roster_add_buddy, /* add_buddy */
1854 NULL, /* add_buddies */ 1853 NULL, /* add_buddies */
1855 jabber_roster_remove_buddy, /* remove_buddy */ 1854 jabber_roster_remove_buddy, /* remove_buddy */
1856 NULL, /* remove_buddies */ 1855 NULL, /* remove_buddies */