Changeset 1522faf
- Timestamp:
- 2015-04-06T02:26:44Z (10 years ago)
- Children:
- d16e951
- Parents:
- 71f87ba (diff), 69982f8 (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. - git-author:
- dequis <dx@…> (06-04-15 02:24:35)
- git-committer:
- dequis <dx@…> (06-04-15 02:26:44)
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
Makefile
r71f87ba r1522faf 159 159 x=$$(basename $$(pwd)); \ 160 160 cd ..; \ 161 tar czf $$x.tar.gz --exclude -from=.gitignore$$x161 tar czf $$x.tar.gz --exclude=debian --exclude=.git* --exclude=.depend $$x 162 162 163 163 $(subdirs): -
bitlbee.h
r71f87ba r1522faf 36 36 37 37 #define PACKAGE "BitlBee" 38 #define BITLBEE_VERSION "3. 2.2"38 #define BITLBEE_VERSION "3.4" 39 39 #define VERSION BITLBEE_VERSION 40 40 #define BITLBEE_VER(a, b, c) (((a) << 16) + ((b) << 8) + (c)) 41 #define BITLBEE_VERSION_CODE BITLBEE_VER(3, 2, 2)41 #define BITLBEE_VERSION_CODE BITLBEE_VER(3, 4, 0) 42 42 43 43 #define MAX_STRING 511 -
doc/CHANGES
r71f87ba r1522faf 1 1 This ChangeLog mostly lists changes relevant to users. A full log can be 2 found in the bzr commit logs, for example you can try: 3 4 http://bugs.bitlbee.org/bitlbee/timeline?daysback=90&changeset=on 2 found in the git commit logs, for example you can try: 3 4 https://github.com/bitlbee/bitlbee/commits/master 5 6 Version 3.4: 7 - First release pretty much fully prepared by dx instead of Wilmer. Just look 8 at the tightly structured changelog! 9 - Main repository migrated from bzr to git 10 - Some API/ABI changes. Recompiling third party plugins is required! 11 - Important bugfixes: 12 * Fix memory leak when calling word_wrap() on groupchat messages (dx) 13 * Fix segfault after a file transfer is complete (dx) 14 * Fix bug where NSS would refuse to work in forkdaemon mode (dx) 15 * Fix several bugs with UTF8 nicks (dx) 16 * Fix some nasty deadlocks that appared mostly with libpurple (dx) 17 - General changes: 18 * Add a 'pattern' parameter to the blist command, to filter it (tribut) 19 * Implemented /kick support, only supported by purple for now (jgeboski) 20 * Add a "special" state to show_users (mapped to the % prefix) (jgeboski) 21 * Improved support for cygwin, openbsd and darwin (jcopenha) 22 * Create temporary users instead of showing "Message from unknown 23 participant" (jgeboski) 24 - purple: 25 * Local contact lists for gadugadu and whatsapp (dx) 26 * Add topic and name_hint to groupchats (seirl) 27 * Support for 'input' requests (such as telegram auth codes) (seirl) 28 Note that telegram-purple itself is rather unstable ATM, it may crash. 29 - jabber: 30 * Handle compressed DNS responses in SRV lookup (jcopenha) 31 * Fix case sensitivity issues with JIDs (GRMrGecko, dx) 32 * Implement XEP-0203 style message timestamps (dx) 33 * Fix "Server claims your JID is X instead of Y" warnings (dx) 34 * Account-wide display_name setting, mostly for hipchat (dx) 35 - twitter: 36 * Filter channels. Search by keyword/hashtag or a list of users (jgeboski) 37 * Fix bug in "reply" command which removed the first quote character (dx) 38 * Add "rawreply" command, like reply but bitlbee won't add @mention (WillP) 39 * Add support for The United States of America (favorite/fav aliases) (dx) 40 * Default show_old_mentions to 0 (dx) 41 * Start stream from last tweet on connect/reconnect (roger) 42 - msn: 43 * Disabled module by default. The protocol we used (MSNP18) stopped working 44 last week. This is being worked on, but it's far from ready for release. 45 - And lots of small bugfixes, too many to list here. 46 47 Finished 25 Mar 2015 5 48 6 49 Version 3.2.2: -
doc/user-guide/misc.xml
r71f87ba r1522faf 409 409 </sect1> 410 410 411 <sect1 id="whatsnew030400"> 412 <title>New stuff in BitlBee 3.4</title> 413 414 <para> 415 Lots of bugfixes! <emphasis>Important:</emphasis> Recompiling third party plugins such as bitlbee-steam or bitlbee-facebook is <emphasis>required</emphasis>! 416 </para> 417 418 <simplelist> 419 <member><emphasis>twitter:</emphasis> Filter channels - Search by keyword/hashtag or a list of users. See the <emphasis>HowtoTwitter</emphasis> wiki page for more details!</member> 420 <member><emphasis>twitter:</emphasis> Add "rawreply" command, like reply but bitlbee won't add @mention. Also add "favorite" / "fav" command aliases.</member> 421 <member><emphasis>twitter:</emphasis> Start stream from last tweet on connect/reconnect to avoid showing duplicate tweets</member> 422 <member><emphasis>jabber:</emphasis> Fixed crashes with file transfers (they still fail at bypassing NATs, but at least they fail without crashing)</member> 423 <member><emphasis>purple:</emphasis> Improved support for gadugadu, whatsapp and telegram.</member> 424 <member><emphasis>msn:</emphasis> disabled in this release since the protocol we used (MSNP18) stopped working.</member> 425 <member>Add a 'pattern' parameter to the blist command, to filter it.</member> 426 <member>The <emphasis>utf8_nicks</emphasis> setting should be more reliable now.</member> 427 </simplelist> 428 429 <para> 430 See the full changelog for details! 431 </para> 432 433 </sect1> 434 411 435 </chapter> -
irc_channel.c
r71f87ba r1522faf 588 588 char *irc_channel_name_gen(bee_t *bee, const char *hint) 589 589 { 590 char name[MAX_NICK_LENGTH + 1] = { 0 }; 591 592 name[0] = '#'; 593 strncpy(name + 1, hint, MAX_NICK_LENGTH - 1); 594 name[MAX_NICK_LENGTH] = '\0'; 590 char *name, *final_name; 591 gsize bytes_written; 592 593 name = g_convert_with_fallback(hint, -1, "ASCII//TRANSLIT", "UTF-8", "", NULL, &bytes_written, NULL); 594 if (bytes_written > MAX_NICK_LENGTH) { 595 name[MAX_NICK_LENGTH] = '\0'; 596 } 595 597 596 598 irc_channel_name_strip(name); 597 599 598 600 if (set_getbool(&bee->set, "lcnicks")) { 599 nick_lc(bee->ui_data, name + 1);601 nick_lc(bee->ui_data, name); 600 602 } 601 603 … … 604 606 } 605 607 606 return g_strdup(name); 608 final_name = g_strconcat("#", name, NULL); 609 610 g_free(name); 611 612 return final_name; 607 613 } 608 614 -
irc_im.c
r71f87ba r1522faf 235 235 } else { 236 236 /* Modules can swallow messages. */ 237 return TRUE;237 goto cleanup; 238 238 } 239 239 } … … 250 250 wrapped = word_wrap(msg, 425); 251 251 irc_send_msg(iu, "PRIVMSG", dst, wrapped, prefix); 252 253 252 g_free(wrapped); 253 254 cleanup: 254 255 g_free(prefix); 255 256 g_free(msg); … … 291 292 292 293 irc_send_msg((irc_user_t *) bu->ui_data, "NOTICE", irc->user->nick, msg->str, NULL); 294 295 g_string_free(msg, TRUE); 293 296 294 297 return TRUE; -
lib/proxy.c
r71f87ba r1522faf 63 63 static int proxy_connect_none(const char *host, unsigned short port_, struct PHB *phb); 64 64 65 static gboolean gaim_io_connected(gpointer data, gint source, b_input_condition cond) 65 static gboolean phb_close(struct PHB *phb) 66 { 67 close(phb->fd); 68 phb->func(phb->data, -1, B_EV_IO_READ); 69 g_free(phb->host); 70 g_free(phb); 71 return FALSE; 72 } 73 74 static gboolean proxy_connected(gpointer data, gint source, b_input_condition cond) 66 75 { 67 76 struct PHB *phb = data; … … 80 89 dup2(new_fd, source); 81 90 closesocket(new_fd); 82 phb->inpa = b_input_add(source, B_EV_IO_WRITE, gaim_io_connected, phb);91 phb->inpa = b_input_add(source, B_EV_IO_WRITE, proxy_connected, phb); 83 92 return FALSE; 84 93 } 85 94 } 86 freeaddrinfo(phb->gai);87 95 closesocket(source); 88 b_event_remove(phb->inpa); 89 phb->inpa = 0; 90 if (phb->proxy_func) { 91 phb->proxy_func(phb->proxy_data, -1, B_EV_IO_READ); 92 } else { 93 phb->func(phb->data, -1, B_EV_IO_READ); 94 g_free(phb); 95 } 96 return FALSE; 97 } 96 source = -1; 97 /* socket is dead, but continue to clean up */ 98 } else { 99 sock_make_blocking(source); 100 } 101 98 102 freeaddrinfo(phb->gai); 99 sock_make_blocking(source);100 103 b_event_remove(phb->inpa); 101 104 phb->inpa = 0; … … 160 163 continue; 161 164 } else { 162 phb->inpa = b_input_add(fd, B_EV_IO_WRITE, gaim_io_connected, phb);165 phb->inpa = b_input_add(fd, B_EV_IO_WRITE, proxy_connected, phb); 163 166 phb->fd = fd; 164 167 … … 206 209 } 207 210 208 close(source); 209 phb->func(phb->data, -1, B_EV_IO_READ); 210 g_free(phb->host); 211 g_free(phb); 212 213 return FALSE; 211 return phb_close(phb); 214 212 } 215 213 … … 226 224 len = sizeof(error); 227 225 if (getsockopt(source, SOL_SOCKET, SO_ERROR, &error, &len) < 0) { 228 close(source); 229 phb->func(phb->data, -1, B_EV_IO_READ); 230 g_free(phb->host); 231 g_free(phb); 232 return FALSE; 226 return phb_close(phb); 233 227 } 234 228 sock_make_blocking(source); … … 237 231 phb->host, phb->port); 238 232 if (send(source, cmd, strlen(cmd), 0) < 0) { 239 close(source); 240 phb->func(phb->data, -1, B_EV_IO_READ); 241 g_free(phb->host); 242 g_free(phb); 243 return FALSE; 233 return phb_close(phb); 244 234 } 245 235 … … 252 242 g_free(t2); 253 243 if (send(source, cmd, strlen(cmd), 0) < 0) { 254 close(source); 255 phb->func(phb->data, -1, B_EV_IO_READ); 256 g_free(phb->host); 257 g_free(phb); 258 return FALSE; 244 return phb_close(phb); 259 245 } 260 246 } … … 262 248 g_snprintf(cmd, sizeof(cmd), "\r\n"); 263 249 if (send(source, cmd, strlen(cmd), 0) < 0) { 264 close(source); 265 phb->func(phb->data, -1, B_EV_IO_READ); 266 g_free(phb->host); 267 g_free(phb); 268 return FALSE; 250 return phb_close(phb); 269 251 } 270 252 … … 302 284 } 303 285 304 close(source); 305 phb->func(phb->data, -1, B_EV_IO_READ); 306 g_free(phb->host); 307 g_free(phb); 308 309 return FALSE; 286 return phb_close(phb); 310 287 } 311 288 … … 323 300 len = sizeof(error); 324 301 if (getsockopt(source, SOL_SOCKET, SO_ERROR, &error, &len) < 0) { 325 close(source); 326 phb->func(phb->data, -1, B_EV_IO_READ); 327 g_free(phb->host); 328 g_free(phb); 329 return FALSE; 302 return phb_close(phb); 330 303 } 331 304 sock_make_blocking(source); … … 333 306 /* XXX does socks4 not support host name lookups by the proxy? */ 334 307 if (!(hp = gethostbyname(phb->host))) { 335 close(source); 336 phb->func(phb->data, -1, B_EV_IO_READ); 337 g_free(phb->host); 338 g_free(phb); 339 return FALSE; 308 return phb_close(phb); 340 309 } 341 310 … … 350 319 packet[8] = 0; 351 320 if (write(source, packet, 9) != 9) { 352 close(source); 353 phb->func(phb->data, -1, B_EV_IO_READ); 354 g_free(phb->host); 355 g_free(phb); 356 return FALSE; 321 return phb_close(phb); 357 322 } 358 323 … … 383 348 384 349 if (read(source, buf, 10) < 10) { 385 close(source); 386 phb->func(phb->data, -1, B_EV_IO_READ); 387 g_free(phb->host); 388 g_free(phb); 389 return FALSE; 350 return phb_close(phb); 390 351 } 391 352 if ((buf[0] != 0x05) || (buf[1] != 0x00)) { 392 close(source); 393 phb->func(phb->data, -1, B_EV_IO_READ); 394 g_free(phb->host); 395 g_free(phb); 396 return FALSE; 353 return phb_close(phb); 397 354 } 398 355 … … 420 377 421 378 if (write(source, buf, (5 + strlen(phb->host) + 2)) < (5 + strlen(phb->host) + 2)) { 422 close(source); 423 phb->func(phb->data, -1, B_EV_IO_READ); 424 g_free(phb->host); 425 g_free(phb); 379 phb_close(phb); 426 380 return; 427 381 } … … 438 392 439 393 if (read(source, buf, 2) < 2) { 440 close(source); 441 phb->func(phb->data, -1, B_EV_IO_READ); 442 g_free(phb->host); 443 g_free(phb); 444 return FALSE; 394 return phb_close(phb); 445 395 } 446 396 447 397 if ((buf[0] != 0x01) || (buf[1] != 0x00)) { 448 close(source); 449 phb->func(phb->data, -1, B_EV_IO_READ); 450 g_free(phb->host); 451 g_free(phb); 452 return FALSE; 398 return phb_close(phb); 453 399 } 454 400 … … 466 412 467 413 if (read(source, buf, 2) < 2) { 468 close(source); 469 phb->func(phb->data, -1, B_EV_IO_READ); 470 g_free(phb->host); 471 g_free(phb); 472 return FALSE; 414 return phb_close(phb); 473 415 } 474 416 475 417 if ((buf[0] != 0x05) || (buf[1] == 0xff)) { 476 close(source); 477 phb->func(phb->data, -1, B_EV_IO_READ); 478 g_free(phb->host); 479 g_free(phb); 480 return FALSE; 418 return phb_close(phb); 481 419 } 482 420 … … 489 427 memcpy(buf + 2 + i + 1, proxypass, j); 490 428 if (write(source, buf, 3 + i + j) < 3 + i + j) { 491 close(source); 492 phb->func(phb->data, -1, B_EV_IO_READ); 493 g_free(phb->host); 494 g_free(phb); 495 return FALSE; 429 return phb_close(phb); 496 430 } 497 431 … … 517 451 len = sizeof(error); 518 452 if (getsockopt(source, SOL_SOCKET, SO_ERROR, &error, &len) < 0) { 519 close(source); 520 phb->func(phb->data, -1, B_EV_IO_READ); 521 g_free(phb->host); 522 g_free(phb); 523 return FALSE; 453 return phb_close(phb); 524 454 } 525 455 sock_make_blocking(source); … … 539 469 540 470 if (write(source, buf, i) < i) { 541 close(source); 542 phb->func(phb->data, -1, B_EV_IO_READ); 543 g_free(phb->host); 544 g_free(phb); 545 return FALSE; 471 return phb_close(phb); 546 472 } 547 473 -
lib/ssl_gnutls.c
r71f87ba r1522faf 124 124 125 125 if (conn->fd < 0) { 126 g_free(conn->hostname); 126 127 g_free(conn); 127 128 return NULL; … … 314 315 if (source == -1) { 315 316 conn->func(conn->data, 0, NULL, cond); 317 g_free(conn->hostname); 316 318 g_free(conn); 317 319 return FALSE; … … 355 357 conn->func(conn->data, 0, NULL, cond); 356 358 357 gnutls_deinit(conn->session); 358 closesocket(conn->fd); 359 360 g_free(conn); 359 ssl_disconnect(conn); 361 360 } 362 361 } else { … … 364 363 conn->func(conn->data, stver, NULL, cond); 365 364 366 gnutls_deinit(conn->session); 367 closesocket(conn->fd); 368 369 g_free(conn); 365 ssl_disconnect(conn); 370 366 } else { 371 367 /* For now we can't handle non-blocking perfectly everywhere... */ -
otr.c
r71f87ba r1522faf 287 287 void otr_irc_free(irc_t *irc) 288 288 { 289 set_t *s; 289 290 otr_t *otr = irc->otr; 290 291 … … 292 293 b_event_remove(otr->timer); 293 294 otrl_userstate_free(otr->us); 295 296 s = set_find(&irc->b->set, "otr_policy"); 297 g_slist_free(s->eval_data); 298 294 299 if (otr->keygen) { 295 300 kill(otr->keygen, SIGTERM); … … 434 439 ic->acc->user, ic->acc->prpl->name, iu->bu->handle, msg, &newmsg, 435 440 &tlvs, NULL, NULL, NULL); 441 442 if (tlvs) { 443 otrl_tlv_free(tlvs); 444 } 436 445 437 446 if (ignore_msg) { … … 472 481 /* libotr wants us to replace our message */ 473 482 /* NB: caller will free old msg */ 474 msg = g_strdup(otrmsg);483 msg = st ? NULL : g_strdup(otrmsg); 475 484 otrl_message_free(otrmsg); 476 485 } … … 1325 1334 1326 1335 log_message(LOGLVL_INFO, "otr: %s", msg); 1336 1337 g_free(msg); 1327 1338 } 1328 1339 … … 2075 2086 } 2076 2087 } 2077 2078 /* vim: set noet ts=4 sw=4: */ -
protocols/jabber/jabber_util.c
r71f87ba r1522faf 566 566 567 567 if ((s = strchr(jid, '=')) == NULL) { 568 g_free(jid); 568 569 return NULL; 569 570 } -
protocols/msn/msn_util.c
r71f87ba r1522faf 174 174 }; 175 175 176 static void msn_buddy_ask_ yes(void *data)176 static void msn_buddy_ask_free(void *data) 177 177 { 178 178 struct msn_buddy_ask_data *bla = data; 179 180 msn_buddy_list_add(bla->ic, MSN_BUDDY_AL, bla->handle, bla->realname, NULL);181 182 imcb_ask_add(bla->ic, bla->handle, NULL);183 179 184 180 g_free(bla->handle); … … 187 183 } 188 184 185 static void msn_buddy_ask_yes(void *data) 186 { 187 struct msn_buddy_ask_data *bla = data; 188 189 msn_buddy_list_add(bla->ic, MSN_BUDDY_AL, bla->handle, bla->realname, NULL); 190 191 imcb_ask_add(bla->ic, bla->handle, NULL); 192 193 msn_buddy_ask_free(bla); 194 } 195 189 196 static void msn_buddy_ask_no(void *data) 190 197 { … … 193 200 msn_buddy_list_add(bla->ic, MSN_BUDDY_BL, bla->handle, bla->realname, NULL); 194 201 195 g_free(bla->handle); 196 g_free(bla->realname); 197 g_free(bla); 202 msn_buddy_ask_free(bla); 198 203 } 199 204 … … 216 221 "The user %s (%s) wants to add you to his/her buddy list.", 217 222 bu->handle, bu->fullname); 218 imcb_ask(bu->ic, buf, bla, msn_buddy_ask_yes, msn_buddy_ask_no); 223 224 imcb_ask_with_free(bu->ic, buf, bla, msn_buddy_ask_yes, msn_buddy_ask_no, msn_buddy_ask_free); 219 225 } 220 226 -
protocols/nogaim.c
r71f87ba r1522faf 498 498 }; 499 499 500 static void imcb_ask_ auth_cb_no(void *data)500 static void imcb_ask_cb_free(void *data) 501 501 { 502 502 struct imcb_ask_cb_data *cbd = data; 503 504 cbd->ic->acc->prpl->auth_deny(cbd->ic, cbd->handle);505 503 506 504 g_free(cbd->handle); … … 508 506 } 509 507 508 static void imcb_ask_auth_cb_no(void *data) 509 { 510 struct imcb_ask_cb_data *cbd = data; 511 512 cbd->ic->acc->prpl->auth_deny(cbd->ic, cbd->handle); 513 514 imcb_ask_cb_free(cbd); 515 } 516 510 517 static void imcb_ask_auth_cb_yes(void *data) 511 518 { … … 514 521 cbd->ic->acc->prpl->auth_allow(cbd->ic, cbd->handle); 515 522 516 g_free(cbd->handle); 517 g_free(cbd); 523 imcb_ask_cb_free(cbd); 518 524 } 519 525 … … 535 541 data->handle = g_strdup(handle); 536 542 query_add((irc_t *) ic->bee->ui_data, ic, s, 537 imcb_ask_auth_cb_yes, imcb_ask_auth_cb_no, g_free, data); 538 } 539 540 541 static void imcb_ask_add_cb_no(void *data) 542 { 543 g_free(((struct imcb_ask_cb_data*) data)->handle); 544 g_free(data); 543 imcb_ask_auth_cb_yes, imcb_ask_auth_cb_no, imcb_ask_cb_free, data); 544 545 g_free(s); 545 546 } 546 547 … … 551 552 cbd->ic->acc->prpl->add_buddy(cbd->ic, cbd->handle, NULL); 552 553 553 imcb_ask_ add_cb_no(data);554 imcb_ask_cb_free(data); 554 555 } 555 556 556 557 void imcb_ask_add(struct im_connection *ic, const char *handle, const char *realname) 557 558 { 558 struct imcb_ask_cb_data *data = g_new0(struct imcb_ask_cb_data, 1);559 struct imcb_ask_cb_data *data; 559 560 char *s; 560 561 … … 564 565 } 565 566 567 data = g_new0(struct imcb_ask_cb_data, 1); 568 566 569 s = g_strdup_printf("The user %s is not in your buddy list yet. Do you want to add him/her now?", handle); 567 570 … … 569 572 data->handle = g_strdup(handle); 570 573 query_add((irc_t *) ic->bee->ui_data, ic, s, 571 imcb_ask_add_cb_yes, imcb_ask_add_cb_no, g_free, data); 574 imcb_ask_add_cb_yes, imcb_ask_cb_free, imcb_ask_cb_free, data); 575 576 g_free(s); 572 577 } 573 578 -
storage_xml.c
r71f87ba r1522faf 128 128 } 129 129 } else { 130 g_free(pass_cr); 131 g_free(password); 130 132 return XT_ABORT; 131 133 }
Note: See TracChangeset
for help on using the changeset viewer.