Changeset d858d21
- Timestamp:
- 2008-02-17T02:12:42Z (17 years ago)
- Branches:
- master
- Children:
- 59ab2af
- Parents:
- 2ecfe39
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
bitlbee.c
r2ecfe39 rd858d21 143 143 log_link( LOGLVL_ERROR, LOGOUTPUT_IRC ); 144 144 log_link( LOGLVL_WARNING, LOGOUTPUT_IRC ); 145 /* TODO: Remove debugging log_link's */146 log_link( LOGLVL_INFO, LOGOUTPUT_IRC );147 log_link( LOGLVL_DEBUG, LOGOUTPUT_IRC );148 145 149 146 return( 0 ); -
otr.c
r2ecfe39 rd858d21 232 232 int kg=0; 233 233 234 log_message(LOGLVL_DEBUG, "otr_load '%s'", irc->nick);235 236 234 g_snprintf(s, 511, "%s%s.otr_keys", global.conf->configdir, irc->nick); 237 235 e = otrl_privkey_read(irc->otr->us, s); … … 265 263 gcry_error_t e; 266 264 267 log_message(LOGLVL_DEBUG, "otr_save '%s'", irc->nick);268 269 265 g_snprintf(s, 511, "%s%s.otr_fprints", global.conf->configdir, irc->nick); 270 266 e = otrl_privkey_write_fingerprints(irc->otr->us, s); … … 279 275 char s[512]; 280 276 281 log_message(LOGLVL_DEBUG, "otr_remove '%s'", nick);282 283 277 g_snprintf(s, 511, "%s%s.otr_keys", global.conf->configdir, nick); 284 278 unlink(s); … … 291 285 char s[512], t[512]; 292 286 293 log_message(LOGLVL_DEBUG, "otr_rename '%s' -> '%s'", onick, nnick);294 295 287 g_snprintf(s, 511, "%s%s.otr_keys", global.conf->configdir, onick); 296 288 g_snprintf(t, 511, "%s%s.otr_keys", global.conf->configdir, nnick); … … 433 425 const char *p; 434 426 435 log_message(LOGLVL_DEBUG, "op_policy '%s' '%s'", context->accountname, context->protocol);436 437 427 /* policy override during keygen: if we're missing the key for context but are currently 438 428 generating it, then that's as much as we can do. => temporarily return NEVER. */ … … 459 449 struct im_connection *ic = check_imc(opdata, accountname, protocol); 460 450 461 log_message(LOGLVL_DEBUG, "op_create_privkey '%s' '%s'", accountname, protocol);462 463 451 /* will fail silently if keygen already in progress */ 464 452 otr_keygen(ic->irc, accountname, protocol); … … 471 459 user_t *u; 472 460 473 log_message(LOGLVL_DEBUG, "op_is_logged_in '%s' '%s' '%s'", accountname, protocol, recipient);474 475 461 /* lookup the user_t for the given recipient */ 476 462 u = user_findhandle(ic, recipient); … … 490 476 struct im_connection *ic = check_imc(opdata, accountname, protocol); 491 477 492 log_message(LOGLVL_DEBUG, "op_inject_message '%s' '%s' '%s' '%s'", accountname, protocol, recipient, message);493 494 478 if (strcmp(accountname, recipient) == 0) { 495 479 /* huh? injecting messages to myself? */ … … 509 493 char *msg = g_strdup(message); 510 494 511 log_message(LOGLVL_DEBUG, "op_display_otr_message '%s' '%s' '%s' '%s'", accountname, protocol, username, message);512 513 495 strip_html(msg); 514 496 irc_usermsg(ic->irc, "otr: %s", msg); … … 526 508 527 509 otrl_privkey_hash_to_human(hunam, fingerprint); 528 log_message(LOGLVL_DEBUG, "op_new_fingerprint '%s' '%s' '%s' '%s'", accountname, protocol, username, hunam);529 530 510 irc_usermsg(ic->irc, "new fingerprint for %s: %s", 531 511 peernick(ic->irc, username, protocol), hunam); … … 535 515 { 536 516 struct im_connection *ic = (struct im_connection *)opdata; 537 538 log_message(LOGLVL_DEBUG, "op_write_fingerprints");539 517 540 518 otr_save(ic->irc); … … 547 525 user_t *u; 548 526 const char *trust; 549 550 log_message(LOGLVL_DEBUG, "op_gone_secure '%s' '%s' '%s'", context->accountname, context->protocol, context->username);551 527 552 528 u = peeruser(ic->irc, context->username, context->protocol); … … 573 549 user_t *u; 574 550 575 log_message(LOGLVL_DEBUG, "op_gone_insecure '%s' '%s' '%s'", context->accountname, context->protocol, context->username);576 577 551 u = peeruser(ic->irc, context->username, context->protocol); 578 552 if(!u) { … … 592 566 check_imc(opdata, context->accountname, context->protocol); 593 567 user_t *u; 594 595 log_message(LOGLVL_DEBUG, "op_still_secure '%s' '%s' '%s' is_reply=%d",596 context->accountname, context->protocol, context->username, is_reply);597 568 598 569 u = peeruser(ic->irc, context->username, context->protocol); … … 632 603 struct im_connection *ic = (struct im_connection *)opdata; 633 604 634 log_message(LOGLVL_DEBUG, "op_account_name '%s' '%s'", account, protocol);635 636 605 return peernick(ic->irc, account, protocol); 637 606 } … … 1131 1100 user_t *u; 1132 1101 1133 log_message(LOGLVL_DEBUG, "peeruser '%s' '%s'", handle, protocol);1134 1135 1102 for(u=irc->users; u; u=u->next) { 1136 1103 struct prpl *prpl; … … 1295 1262 } 1296 1263 *p = '\0'; 1297 log_message(LOGLVL_DEBUG, "match_fingerprint '%s'", prefix);1298 log_message(LOGLVL_DEBUG, "n=%d strlen(prefix)=%d", n, strlen(prefix));1299 1264 1300 1265 /* find first fingerprint with the given prefix */ … … 1361 1326 } 1362 1327 *p = '\0'; 1363 log_message(LOGLVL_DEBUG, "match_privkey '%s'", prefix);1364 log_message(LOGLVL_DEBUG, "n=%d strlen(prefix)=%d", n, strlen(prefix));1365 1328 1366 1329 /* find first key which matches the given prefix */ … … 1504 1467 kg_t *kg; 1505 1468 1506 log_message(LOGLVL_DEBUG, "keygen_in_progress '%s' '%s'", handle, protocol);1507 1508 1469 if(!irc->otr->sent_accountname || !irc->otr->sent_protocol) 1509 1470 return 0; … … 1574 1535 if(irc->otr->sent_accountname) { 1575 1536 /* enqueue our job for later transmission */ 1576 log_message(LOGLVL_DEBUG, "enqueueing keygen for %s/%s", handle, protocol);1577 1537 kg_t **kg = &irc->otr->todo; 1578 1538 while(*kg) … … 1583 1543 } else { 1584 1544 /* send our job over and remember it */ 1585 log_message(LOGLVL_DEBUG, "slave: generate for %s/%s!", handle, protocol);1586 1545 fprintf(irc->otr->to, "%s\n%s\n", handle, protocol); 1587 1546 fflush(irc->otr->to); … … 1637 1596 char filename[512], msg[512]; 1638 1597 1639 log_message(LOGLVL_DEBUG, "keygen_finish_handler cond=%d", cond);1640 1641 1598 myfgets(filename, 512, irc->otr->from); 1642 1599 myfgets(msg, 512, irc->otr->from); 1643 1644 log_message(LOGLVL_DEBUG, "filename='%s'", filename);1645 log_message(LOGLVL_DEBUG, "msg='%s'", msg);1646 1600 1647 1601 irc_usermsg(irc, "%s", msg); … … 1667 1621 kg_t *p = irc->otr->todo; 1668 1622 /* send the next one over */ 1669 log_message(LOGLVL_DEBUG, "slave: keygen for %s/%s!", p->accountname, p->protocol);1670 1623 fprintf(irc->otr->to, "%s\n%s\n", p->accountname, p->protocol); 1671 1624 fflush(irc->otr->to); … … 1677 1630 } else { 1678 1631 /* okay, the slave is idle now, so kill him */ 1679 log_message(LOGLVL_DEBUG, "all keys done. die, slave!");1680 1632 fclose(irc->otr->from); 1681 1633 fclose(irc->otr->to); … … 1692 1644 int n; 1693 1645 char buf[1024]; 1694 1695 log_message(LOGLVL_DEBUG, "copyfile '%s' '%s'", a, b);1696 1646 1697 1647 fda = open(a, O_RDONLY);
Note: See TracChangeset
for help on using the changeset viewer.