ALT Linux Bugzilla
– Attachment 1902 Details for
Bug 11463
MUC собранный с JCR рушится при попытке передать файл в конференции
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
Патч, исправляющий баг с неверным закрытием </stream:stream>
jcr-end-elements-alt.patch (text/plain), 2.38 KB, created by
Pavel Boldin
on 2007-04-12 00:29:58 MSD
(
hide
)
Description:
Патч, исправляющий баг с неверным закрытием </stream:stream>
Filename:
MIME Type:
Creator:
Pavel Boldin
Created:
2007-04-12 00:29:58 MSD
Size:
2.38 KB
patch
obsolete
>diff -NurpP jcr-0.2.4.orig/jcomp/jcr_elements.c jcr-0.2.4/jcomp/jcr_elements.c >--- jcr-0.2.4.orig/jcomp/jcr_elements.c 2005-12-11 00:23:54 +0400 >+++ jcr-0.2.4/jcomp/jcr_elements.c 2005-12-11 00:28:17 +0400 >@@ -22,6 +22,14 @@ $Id: jcr_elements.c,v 1.19 2004/07/21 15 > > #include "jcomp.h" > >+static int check_tag_name(char *name, char* needle, int size) >+{ >+ if(strlen(name) != strlen(needle)) >+ return strlen(name) - strlen(needle); >+ >+ return strncasecmp(name, needle, strlen(needle)); >+} >+ > void jcr_start_element(void *m, const char *name, const char **attrib) { > extern jcr_instance jcr; > pool p; >@@ -31,12 +39,12 @@ void jcr_start_element(void *m, const ch > switch (jcr->stream_state) { > > case _STREAM_INIT_STATE: >- if (strncasecmp(name, "stream:stream", 13) == 0) { >+ if (check_tag_name(name, "stream:stream", 13) == 0) { > char *pass = xmlnode_get_data(xmlnode_get_tag(jcr->config,"secret")); > int i = 0; > if (attrib == NULL) return; > while (attrib[i] != '\0') { >- if (strncasecmp(attrib[i], "id", 2) == 0) >+ if (check_tag_name(attrib[i], "id", 2) == 0) > break; > i += 2; > } >@@ -89,7 +97,7 @@ void jcr_end_element(void *m, const char > > case _STREAM_INIT_STATE: > case _STREAM_AUTH_SENT: >- if (strncasecmp(name, "handshake", 9) == 0) { >+ if (check_tag_name(name, "handshake", 9) == 0) { > jcr->stream_state = _STREAM_CONNECTED; > log_debug(JDBG, "<handshake> received"); > } >@@ -99,19 +107,19 @@ void jcr_end_element(void *m, const char > log_warn(JDBG, "jcr->current == NULL, closing stream"); > jcr_main_close_stream(); > } else { >- if (strncasecmp(name, "stream:error", 12) == 0) { >+ if (check_tag_name(name, "stream:error", 12) == 0) { > log_warn(JDBG, "'stream:error' on server stream: '%s'", xmlnode2str(jcr->current)); > // jcr_main_close_stream(); > return; > } > >- if (strncasecmp(name, "stream", 6) == 0) { >+ if (check_tag_name(name, "stream", 6) == 0) { > log_warn(JDBG, "End of Stream from server: '%s'", xmlnode2str(jcr->current)); > jcr_main_close_stream(); > return; > } > >- if (strncasecmp(name, "stream:stream", 13) == 0) { >+ if (check_tag_name(name, "stream:stream", 13) == 0) { > log_warn(JDBG, "End of Stream from server: '%s'", xmlnode2str(jcr->current)); > jcr_main_close_stream(); > return;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 11463
: 1902