----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviewboard.asterisk.org/r/3985/#review13281 -----------------------------------------------------------
Ship it! Ship It! - Joshua Colp On Sept. 10, 2014, 9:31 p.m., Jonathan Rose wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviewboard.asterisk.org/r/3985/ > ----------------------------------------------------------- > > (Updated Sept. 10, 2014, 9:31 p.m.) > > > Review request for Asterisk Developers. > > > Bugs: ASTERISK-24231 > https://issues.asterisk.org/jira/browse/ASTERISK-24231 > > > Repository: Asterisk > > > Description > ------- > > Attempting to use the following CLI command would cause a crash (regardless > of whether a realtime database were in any way configured) > > realtime destroy (any table) field1 value1 > > This was due to attempting to create a variable list from a NULL name since > we sent an empty va list to a function that creates variable lists from va > lists. > > I've changed that function to be tolerant of empty va lists and I've changed > the ast_realtime_destroy function to go ahead and call the realtime engine > destroy functions even if the variable list that it gets back from that > function is NULL. > > > Diffs > ----- > > /branches/12/main/config.c 422869 > > Diff: https://reviewboard.asterisk.org/r/3985/diff/ > > > Testing > ------- > > I tested the changes against both a postgres database connected via > res_config_pgsql and a mysql database connected via res_config_odbc. Of the > two, res_config_odbc appeared to be the more likely source of trouble since > it might use the variable list for something other than just iteration. It > appears to set a string field to the variable list for whatever reason... in > any event, both appeared to work fine and I didn't notice anything out of the > ordinary happening due to deallocation or anything. > > I went ahead and checked all the other realtime engines to make sure their > destroy functions looked like they would be compatible with NULL variable > lists as well and they all checked out... they just add entries by iterating > along the list and if it's NULL it just won't enter the loop in each case. > > > Thanks, > > Jonathan Rose > >
-- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-dev mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-dev