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