[OpenSIPS-Devel] buggy event_parser in parse_event.c?
Juha Heinanen
jh at tutpro.com
Sun Oct 4 11:04:56 CEST 2009
i started to wonder why i'm sometimes seeing these kind of error messages
in syslog while starting opensips trunk presence server:
Oct 4 11:38:02 localhost /usr/sbin/pres-serv[11306]: NOTICE:presence:mod_init: initializing module ...
Oct 4 11:38:02 localhost /usr/sbin/pres-serv[11306]: ERROR:core:parse_params: invalid character, ; expected
Oct 4 11:38:02 localhost /usr/sbin/pres-serv[11306]: ERROR:presence:contains_event: parsing event 'presence.winfo'
(i added stuff to the last error message to see the event whose parsing
fails.)
then i started to read parse_event.c/event_parser() code and it didn't
make sense to me:
- after parsing the event, it goes to check if next char is ';':
if( (*end)== ';')
is that correct, because there may not be a next char, i.e., end may
point to random byte after the event string? if it does so, error
results if the next char happens to be ';'.
- why is event sting copied to buf, for which i don't see any use in the
function?
-- juha
More information about the Devel
mailing list