Changeset 7a9d968 for protocols/jabber
- Timestamp:
- 2018-03-10T11:30:39Z (7 years ago)
- Children:
- 5447c59
- Parents:
- 3f44e43 (diff), 4a9c6b0 (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. - Location:
- protocols/jabber
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/jabber/Makefile
r3f44e43 r7a9d968 38 38 $(objects): %.o: $(_SRCDIR_)%.c 39 39 @echo '*' Compiling $< 40 @$(CC) -c $(CFLAGS) $(CFLAGS_BITLBEE) $< -o $@40 $(VERBOSE) $(CC) -c $(CFLAGS) $(CFLAGS_BITLBEE) $< -o $@ 41 41 42 42 jabber_mod.o: $(objects) 43 43 @echo '*' Linking jabber_mod.o 44 @$(LD) $(LFLAGS) $(objects) -o jabber_mod.o44 $(VERBOSE) $(LD) $(LFLAGS) $(objects) -o jabber_mod.o 45 45 46 46 -include .depend/*.d -
protocols/jabber/conference.c
r3f44e43 r7a9d968 167 167 jabber_buddy_remove_bare(c->ic, jc->name); 168 168 169 g_free(jc->last_sent_message); 169 170 g_free(jc->my_full_jid); 170 171 g_free(jc->name); … … 187 188 188 189 jabber_cache_add(ic, node, jabber_chat_self_message); 190 191 g_free(jc->last_sent_message); 192 jc->last_sent_message = g_strdup(message); 189 193 190 194 return !jabber_write_packet(ic, node); … … 325 329 } 326 330 bud->flags |= JBFLAG_IS_ANONYMOUS; 331 } else if (bud == jc->me) { 332 g_free(bud->ext_jid); 333 bud->ext_jid = g_strdup(jd->me); 327 334 } 328 335 … … 347 354 } 348 355 356 imcb_chat_add_buddy(chat, bud->ext_jid); 357 349 358 if (bud != jc->me && (jc->flags & JCFLAG_ALWAYS_USE_NICKS) && !(bud->flags & JBFLAG_IS_ANONYMOUS)) { 350 359 imcb_buddy_nick_change(ic, bud->ext_jid, bud->resource); 351 360 } 352 361 353 imcb_chat_add_buddy(chat, bud->ext_jid);354 362 if (s) { 355 363 *s = '/'; … … 494 502 imcb_chat_log(chat, "From conference server: %s", body->text); 495 503 return; 496 } else if (jc && jc->flags & JCFLAG_MESSAGE_SENT && bud == jc->me && 497 (jabber_cache_handle_packet(ic, node) == XT_ABORT)) { 498 /* Self message marked by this bitlbee, don't show it */ 499 return; 504 } else if (jc && jc->flags & JCFLAG_MESSAGE_SENT && bud == jc->me) { 505 if (jabber_cache_handle_packet(ic, node) == XT_ABORT) { 506 /* Self message marked by this bitlbee, don't show it */ 507 return; 508 } else if (xt_find_attr(node, "id") == NULL && 509 g_strcmp0(body->text, jc->last_sent_message) == 0) { 510 /* Some misbehaving servers (like slack) eat the ids and echo anyway. 511 * Try to detect those cases by comparing against the last sent message. */ 512 return; 513 } 500 514 } 501 515 -
protocols/jabber/jabber.h
r3f44e43 r7a9d968 161 161 struct jabber_buddy *me; 162 162 char *invite; 163 char *last_sent_message; 163 164 }; 164 165 -
protocols/jabber/s5bytestream.c
r3f44e43 r7a9d968 500 500 case BS_PHASE_REPLY: 501 501 { 502 struct socks5_message socks5_reply ;502 struct socks5_message socks5_reply = {0}; 503 503 int ret; 504 504 … … 888 888 char *proxy, *next, *errmsg = NULL; 889 889 char port[6]; 890 char host[ HOST_NAME_MAX+ 1];890 char host[NI_MAXHOST + 1]; 891 891 jabber_streamhost_t *sh, *sh2; 892 892 GSList *streamhosts = jd->streamhosts; … … 1046 1046 unsigned char nmethods; 1047 1047 unsigned char method; 1048 } socks5_hello ;1048 } socks5_hello = {0}; 1049 1049 1050 1050 if (!(ret = jabber_bs_peek(bt, &socks5_hello, sizeof(socks5_hello)))) { … … 1091 1091 case BS_PHASE_REQUEST: 1092 1092 { 1093 struct socks5_message socks5_connect ;1093 struct socks5_message socks5_connect = {0}; 1094 1094 int msgsize = sizeof(struct socks5_message); 1095 1095 int ret;
Note: See TracChangeset
for help on using the changeset viewer.