Changes in protocols/skype/skype.c [64bed24:5ebff60]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/skype/skype.c
r64bed24 r5ebff60 21 21 22 22 #define _XOPEN_SOURCE 23 #define _BSD_SOURCE 23 24 #include <poll.h> 24 25 #include <stdio.h> … … 187 188 188 189 va_start(args, fmt); 189 g_vsnprintf(str, IRC_LINE_SIZE, fmt, args);190 vsnprintf(str, IRC_LINE_SIZE, fmt, args); 190 191 va_end(args); 191 192 … … 321 322 } 322 323 return NULL; 323 }324 325 static struct groupchat *skype_chat_get_or_create(struct im_connection *ic, char *id)326 {327 struct skype_data *sd = ic->proto_data;328 struct groupchat *gc = bee_chat_by_title(ic->bee, ic, id);329 330 if (!gc) {331 gc = imcb_chat_new(ic, id);332 imcb_chat_name_hint(gc, id);333 imcb_chat_add_buddy(gc, sd->username);334 335 skype_printf(ic, "GET CHAT %s ADDER\n", id);336 skype_printf(ic, "GET CHAT %s TOPIC\n", id);337 skype_printf(ic, "GET CHAT %s ACTIVEMEMBERS\n", id);338 }339 340 return gc;341 324 } 342 325 … … 705 688 info += 9; 706 689 if (sd->handle && sd->body && sd->type) { 707 struct groupchat *gc = skype_chat_get_or_create(ic, info);690 struct groupchat *gc = bee_chat_by_title(ic->bee, ic, info); 708 691 int i; 709 692 for (i = 0; i < g_list_length(sd->body); i++) { … … 1043 1026 } 1044 1027 if (!strcmp(info, "STATUS MULTI_SUBSCRIBED")) { 1045 skype_chat_get_or_create(ic, id); 1028 gc = bee_chat_by_title(ic->bee, ic, id); 1029 if (!gc) { 1030 gc = imcb_chat_new(ic, id); 1031 imcb_chat_name_hint(gc, id); 1032 } 1033 skype_printf(ic, "GET CHAT %s ADDER\n", id); 1034 skype_printf(ic, "GET CHAT %s TOPIC\n", id); 1046 1035 } else if (!strcmp(info, "STATUS DIALOG") && sd->groupchat_with) { 1047 gc = skype_chat_get_or_create(ic, id); 1036 gc = imcb_chat_new(ic, id); 1037 imcb_chat_name_hint(gc, id); 1048 1038 /* According to the docs this 1049 1039 * is necessary. However it … … 1056 1046 sd->groupchat_with); 1057 1047 imcb_chat_add_buddy(gc, buf); 1048 imcb_chat_add_buddy(gc, sd->username); 1058 1049 g_free(sd->groupchat_with); 1059 1050 sd->groupchat_with = NULL; 1051 skype_printf(ic, "GET CHAT %s ADDER\n", id); 1052 skype_printf(ic, "GET CHAT %s TOPIC\n", id); 1060 1053 } else if (!strcmp(info, "STATUS UNSUBSCRIBED")) { 1061 1054 gc = bee_chat_by_title(ic->bee, ic, id); … … 1264 1257 } 1265 1258 g_strfreev(lines); 1266 } else if (st == 0 || (st < 0 && !s sl_sockerr_again(sd->ssl))) {1259 } else if (st == 0 || (st < 0 && !sockerr_again())) { 1267 1260 ssl_disconnect(sd->ssl); 1268 1261 sd->fd = -1;
Note: See TracChangeset
for help on using the changeset viewer.