RE: PANIC: gwlib/octstr.c ...
"Igor Ivoilov" <[email protected]>
| Newsgroups | gmane.comp.mobile.kannel.devel |
|---|---|
| Message-ID | <[email protected]> |
The problem with
PANIC: gwlib/octstr.c:2159: seems_valid_real: Assertion `ostr->data[ostr->len] == '\0'' failed.
(Called from gwlib/octstr.c:923:octstr_case_search.)
I have fixed to myself with the patch below.
It means that something is terribly wrong in immutable octstr.
I will run the patched wapgateway on weekend and see for other problems and than commit it to cvs.
Any comments are appreciated
Igor
Index: gwlib/http.c
===================================================================
RCS file: /home/cvs/gateway/gwlib/http.c,v
retrieving revision 1.208
diff -b -u -r1.208 http.c
--- gwlib/http.c 24 Oct 2003 20:24:55 -0000 1.208
+++ gwlib/http.c 7 Nov 2003 17:38:41 -0000
@@ -3000,6 +3000,7 @@
int found;
long i;
List *accepts;
+ Octstr *needle = octstr_create(what);
gwlib_assert_init();
gw_assert(headers != NULL);
@@ -3011,10 +3012,10 @@
found = 0;
for (i = 0; !found && i < list_len(accepts); ++i) {
Octstr *header_value = list_get(accepts, i);
- if (octstr_case_search(header_value, octstr_imm(what), 0) != -1)
+ if (octstr_case_search(header_value, needle, 0) != -1)
found = 1;
}
-
+ octstr_destroy(needle);
http_destroy_headers(accepts);
return found;
}