For the sake of completeness ... in subscribe.c (the line number is approximate ... i have added some extra debug lines above) @@ -664,7 +667,8 @@ event_id.s = row_vals[event_id_col].val.str_val.s; if(event_id.s) event_id.len = strlen(event_id.s); - + else + event_id.len = 0;
to_tag.s = row_vals[to_tag_col].val.str_val.s; to_tag.len = strlen(row_vals[to_tag_col].val.str_val.s); On 4/13/07, Anca-Maria Vamanu <[EMAIL PROTECTED]> wrote:
Indeed there is a bug there. Will make the comit. Thanks. Cesc wrote: > Hi Anca, > > This fixes the crash ... > Index: modules/presence/notify.c > =================================================================== > --- modules/presence/notify.c (revision 1999) > +++ modules/presence/notify.c (working copy) > @@ -764,9 +764,11 @@ > from_domain.s= row_vals[from_domain_col].val.str_val.s; > from_domain.len= strlen(from_domain.s); > event_id.s=row_vals[event_id_col].val.str_val.s; > - event_id.len= strlen(event_id.s); > - if(event_id.s== NULL) > + if(event_id.s== NULL) { > event_id.len = 0; > + } else { > + event_id.len= strlen(event_id.s); > + } > to_tag.s= row_vals[to_tag_col].val.str_val.s; > to_tag.len= strlen(to_tag.s); > from_tag.s= row_vals[from_tag_col].val.str_val.s; > > > > On 4/13/07, Cesc <[EMAIL PROTECTED]> wrote: > >> Hi, >> >> Moving forward ... one more crash. This time after a publish .... >> which generates a NOTIFY (to a second xlite, which is actually not >> running). The watchrs and active_watchers tables contain data from a >> previous run of openser ... >> crash on xlite boot ... active_watchers and watchers table were NOT >> empty >> >> #0 get_subs_dialog (p_user=0x816a7dc, p_domain=0x816a7e4, >> event=0xb7d4f9fb "presence", n=0x0) at notify.c:767 >> #1 0xb7d40b8b in query_db_notify (p_user=0x816a7dc, >> p_domain=0x816a7e4, event=0xb7d4f9fb "presence", watcher_subs=0x0, >> etag=0x0) at notify.c:934 >> #2 0xb7d45c3d in update_presentity (presentity=0x816a7d8, >> body=0xbfd367b0, new_t=1) at presentity.c:240 >> #3 0xb7d48053 in handle_publish (msg=0x8170190, str1=0x0, str2=0x0) >> at publish.c:443 >> #4 0x08051354 in do_action (a=0x816eff8, msg=0x8170190) at action.c:883 >> #5 0x080505aa in run_action_list (a=0x816eb38, msg=0x8170190) at >> action.c:131 >> #6 0x080529ea in do_action (a=0x816fad0, msg=0x8170190) at action.c:801 >> #7 0x080505aa in run_action_list (a=0x816c408, msg=0x8170190) at >> action.c:131 >> #8 0x08053855 in run_top_route (a=0x816c408, msg=0x0) at action.c:111 >> #9 0x08080b20 in receive_msg ( >> buf=0x8135d20 "PUBLISH sip:[EMAIL PROTECTED] >> SIP/2.0\r\nRecord-Route: >> <sip:192.168.1.150;ftag=6c33763f;lr=on>\r\nVia: SIP/2.0/UDP >> 192.168.1.150;branch=z9hG4bK05e2.ef8cea5.0\r\nVia: SIP/2.0/UDP >> 192.168.3.172:13974;branch=z9h"..., len=1143, rcv_info=0xbfd36c58) at >> receive.c:156 >> #10 0x080aecfa in udp_rcv_loop () at udp_server.c:465 >> #11 0x0806ee7e in main_loop () at main.c:834 >> #12 0x080704cb in main (argc=3, argv=0xbfd36e04) at main.c:1399 >> >> >> >> >> 3(8168) DBUG:parse_to: display={"X-lite user 1"}, >> ruri={sip:[EMAIL PROTECTED] >> 3(8168) New Message received: [1] from [sip:[EMAIL PROTECTED] >> 3(8168) Request method used:[PUBLISH]. >> 3(8168) >> ============================================================================================= >> >> 3(8168) DEBUG: t_newtran: T on entrance=0xffffffff >> 3(8168) parse_headers: flags=ffffffffffffffff >> 3(8168) get_hdr_field: cseq <CSeq>: <1> <PUBLISH> >> 3(8168) DEBUG: get_hdr_body : content_length=439 >> 3(8168) found end of header >> 3(8168) parse_headers: flags=78 >> 3(8168) t_lookup_request: start searching: hash=11856, isACK=0 >> 3(8168) DEBUG: RFC3261 transaction matching failed >> 3(8168) DEBUG: t_lookup_request: no transaction found >> 3(8168) >> ============================================================================================= >> >> 3(8168) The request method used is to [PUBLISH] information. (handle >> publish) >> 3(8168) >> ============================================================================================= >> >> 3(8168) parse_headers: flags=ffffffffffffffff >> 3(8168) PRESENCE:handle_publish: SIP-If-Match not found >> 3(8168) PRESENCE: generate_ETag: etag= a.1175417156.8168.1 / 19 >> 3(8168) PRESENCE:handle_publish: new etag = a.1175417156.8168.1 >> 3(8168) PRESENCE: handle_publish: 'expires' found >> 3(8168) PRESENCE: handle_publish: lexpire= 3600 >> 3(8168) PRESENCE: handle_publish: 'To' header ALREADY PARSED: >> <sip:[EMAIL PROTECTED]> >> 3(8168) parse_headers: flags=ffffffffffffffff >> 3(8168) PRESENCE:update_presentity: inserting 7 cols intotable >> 3(8168) DBT:dbt_load_file: request for table [presentity] >> 3(8168) DBT:dbt_load_file: db is [/cafes/openser.1.2/cafesConf/dbtext] >> 3(8168) DBT:dbt_load_file: loading file >> [/cafes/openser.1.2/cafesConf/dbtext/presentity] >> 3(8168) DBT: column[0] is INT! >> 3(8168) DBT: column[1] is STR! >> 3(8168) DBT: column[2] is STR! >> 3(8168) DBT: column[3] is STR! >> 3(8168) DBT: column[4] is STR! >> 3(8168) DBT: column[5] is INT! >> 3(8168) DBT: column[6] is INT! >> 3(8168) DBT: column[7] is STR! >> 3(8168) DTB:dbt_db_get_table: presentity >> 3(8168) DBT:db_insert: done! >> 3(8168) PRESENCE:get_subs_dialog:querying database table = >> active_watchers >> 3(8168) DBT:dbt_query: new res with 11 cols >> 3(8168) DBT:dbt_result_new: new res with 11 cols >> 3(8168) PRESENCE: get_subs_dialog:n= 1 >> >> >> id(int,auto) to_user(str) to_domain(str) from_user(str) >> from_domain(str) event(str) event_id(str,null) to_tag(str) >> from_tag(str) callid(str) cseq(int) contact(str) >> record_route(str,null) expires(int) status(str) version(int) >> 8:Chelsea:cafes.org:Klaas:cafes.org:presence::10.8167.1175417177.1:aa097371:ZDczYzI5YzM4NDMzYWYxMWJjNDFiNDJiNGJhZmVlY2U.:1:sip\:[EMAIL PROTECTED]:13974:<sip\:192.168.1.150;ftag=aa097371;lr=on>:1175420777:active:0 >> >> 7:Klaas:cafes.org:Klaas:cafes.org:presence.winfo::10.8165.1175417176.1:652b6878:YjBiYTdmMTk2YjIwN2EwMTczYzA5ZjM4MzY3YmZkNGY.:2:sip\:[EMAIL PROTECTED]:13974:<sip\:192.168.1.150;ftag=652b6878;lr=on>:1175420776:active:1 >> >> 6:klaas:cafes.org:Chelsea:cafes.org:presence::10.7893.1175416634.4:515e071f:YWQ5NzU4ZjM2NTI2NTQzYTAyN2Q2YWVjNzcwNDkyYWI.:3:sip\:[EMAIL PROTECTED]:13118:<sip\:192.168.1.150;ftag=515e071f;lr=on>:1175420234:active:0 >> >> 5:Chelsea:cafes.org:Chelsea:cafes.org:presence.winfo::10.7892.1175416634.4:44260456:YWRjOTViMDgxMDRmZDY4ZmM0NGZhZjNmZWJhNzIwYWQ.:2:sip\:[EMAIL PROTECTED]:13118:<sip\:192.168.1.150;ftag=44260456;lr=on>:1175420234:active:1 >> >> 4:Chelsea:cafes.org:Klaas:cafes.org:presence::10.7892.1175416614.3:c83fe118:YWM0M2QxZjZlYjRlNWIyNzQyM2YyYzFkYTc5MWExODk.:5:sip\:[EMAIL PROTECTED]:24790:<sip\:192.168.1.150;ftag=c83fe118;lr=on>:1175420214:active:0 >> >> 3:Klaas:cafes.org:Klaas:cafes.org:presence.winfo::10.7893.1175416614.3:913a7d2e:ZGQyMGQxMTUzMDM3NGVkZjAxY2JkOWM4Zjk0ZTA1ZGM.:3:sip\:[EMAIL PROTECTED]:24790:<sip\:192.168.1.150;ftag=913a7d2e;lr=on>:1175420214:active:2 >> >> > > _______________________________________________ > Devel mailing list > [EMAIL PROTECTED] > http://openser.org/cgi-bin/mailman/listinfo/devel >
_______________________________________________ Devel mailing list [EMAIL PROTECTED] http://openser.org/cgi-bin/mailman/listinfo/devel