Changeset 672
- Timestamp:
- 15/08/08 19:50:22 (5 months ago)
- Location:
- trunk
- Files:
-
- 4 modified
-
c2s/authreg.c (modified) (1 diff)
-
c2s/c2s.c (modified) (1 diff)
-
c2s/main.c (modified) (2 diffs)
-
sx/compress.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/c2s/authreg.c
r629 r672 322 322 if(authd) 323 323 { 324 log_write(c2s->log, LOG_NOTICE, "[%d] legacy authentication succeeded: host=%s, username=%s, resource=%s%s ", sess->s->tag, sess->host->realm, username, resource, sess->s->ssf ? ", TLS negotiated" : "");324 log_write(c2s->log, LOG_NOTICE, "[%d] legacy authentication succeeded: host=%s, username=%s, resource=%s%s%s", sess->s->tag, sess->host->realm, username, resource, sess->s->ssf ? ", TLS negotiated" : "", sess->s->compressed ? ", ZLIB compression enabled" : ""); 325 325 326 326 /* create new bound jid holder */ -
trunk/c2s/c2s.c
r662 r672 473 473 /* they sasl auth'd, so we only want the new-style session start */ 474 474 else { 475 log_write(sess->c2s->log, LOG_NOTICE, "[%d] SASL authentication succeeded: mechanism=%s; authzid=%s%s ", sess->s->tag, &sess->s->auth_method[5], sess->s->auth_id, sess->s->ssf ? ", TLS negotiated" : "");475 log_write(sess->c2s->log, LOG_NOTICE, "[%d] SASL authentication succeeded: mechanism=%s; authzid=%s%s%s", sess->s->tag, &sess->s->auth_method[5], sess->s->auth_id, sess->s->ssf ? ", TLS negotiated" : "", sess->s->compressed ? ", ZLIB compression enabled" : ""); 476 476 sess->sasl_authd = 1; 477 477 } -
trunk/c2s/main.c
r662 r672 692 692 #endif 693 693 694 #ifdef HAVE_LIBZ 695 /* get compression up and running */ 696 if(c2s->compression) 697 sx_env_plugin(c2s->sx_env, sx_compress_init); 698 #endif 699 700 #ifdef ENABLE_EXPERIMENTAL 701 /* get stanza ack up */ 702 sx_env_plugin(c2s->sx_env, sx_ack_init); 703 704 /* and user IP address plugin */ 705 sx_env_plugin(c2s->sx_env, sx_address_init); 706 #endif 707 694 708 /* get sasl online */ 695 709 c2s->sx_sasl = sx_env_plugin(c2s->sx_env, sx_sasl_init, "xmpp", _c2s_sx_sasl_callback, (void *) c2s); … … 698 712 exit(1); 699 713 } 700 701 #ifdef HAVE_LIBZ702 /* get compression up and running */703 if(c2s->compression)704 sx_env_plugin(c2s->sx_env, sx_compress_init);705 #endif706 707 #ifdef ENABLE_EXPERIMENTAL708 /* get stanza ack up */709 sx_env_plugin(c2s->sx_env, sx_ack_init);710 711 /* and user IP address plugin */712 sx_env_plugin(c2s->sx_env, sx_address_init);713 #endif714 714 715 715 /* get bind up */ -
trunk/sx/compress.c
r658 r672 43 43 44 44 /* only want compress packets */ 45 if(NAD_ENS(nad, 0) < 0 || NAD_NURI_L(nad, NAD_ENS(nad, 0)) != s trlen(uri_COMPRESS) || strncmp(NAD_NURI(nad, NAD_ENS(nad, 0)), uri_COMPRESS, strlen(uri_COMPRESS)) != 0)45 if(NAD_ENS(nad, 0) < 0 || NAD_NURI_L(nad, NAD_ENS(nad, 0)) != sizeof(uri_COMPRESS)-1 || strncmp(NAD_NURI(nad, NAD_ENS(nad, 0)), uri_COMPRESS, sizeof(uri_COMPRESS)-1) != 0) 46 46 return 1; 47 47 … … 60 60 61 61 /* go ahead */ 62 jqueue_push(s->wbufq, _sx_buffer_new("<compressed xmlns='" uri_COMPRESS "'/>", s trlen(uri_COMPRESS)+ 22, _sx_compress_notify_compress, NULL), 0);62 jqueue_push(s->wbufq, _sx_buffer_new("<compressed xmlns='" uri_COMPRESS "'/>", sizeof(uri_COMPRESS)-1 + 22, _sx_compress_notify_compress, NULL), 0); 63 63 s->want_write = 1; 64 64 … … 224 224 _sx_buffer_alloc_margin(buf, 0, SX_COMPRESS_CHUNK); 225 225 226 sc->rstrm.avail_out = SX_COMPRESS_CHUNK;226 sc->rstrm.avail_out = SX_COMPRESS_CHUNK; 227 227 sc->rstrm.next_out = buf->data + buf->len; 228 228 … … 362 362 363 363 /* go */ 364 jqueue_push(s->wbufq, _sx_buffer_new("<compress xmlns='" uri_COMPRESS "'><method>zlib</method></compress>", s trlen(uri_COMPRESS)+ 51, NULL, NULL), 0);364 jqueue_push(s->wbufq, _sx_buffer_new("<compress xmlns='" uri_COMPRESS "'><method>zlib</method></compress>", sizeof(uri_COMPRESS)-1 + 51, NULL, NULL), 0); 365 365 s->want_write = 1; 366 366 _sx_event(s, event_WANT_WRITE, NULL);
