< Previous by Date | Date Index | Next by Date > |
< Previous in Thread | Thread Index |
Throughout ServerRegistration.cxx, there is a lot of code that uses a local variable, database, like this:
RegistrationPersistenceManager *database = mDum.mRegistrationPersistenceManager;
...
contacts = database->getContacts(mAor);
database->unlockRecord(mAor);
This code will crash if database is NULL, that is, if mDum.mRegistrationPersistenceManager is NULL. The only way it ever gets set is for someone (i.e. the app) to call DialogUsageManager::setRegistrationPersistenceManager(). I'm not sure of the use of this, and maybe it simply doesn't make sense to be doing any registrations without having called this accessor first, but even in that case, perhaps the uses of it should assert or throw an exception instead of just assuming the pointer is valid and using it. For my purposes, I simply wrapped all uses of database in "if (database) ..." which may not be the absolutely correct thing to do. I can post or email the diffs as directed if you all think what I did is appropriate. Otherwise, I just thought I'd mention it.
regards,
-John Gregg
_______________________________________________
resiprocate-devel mailing list
resiprocate-devel@resiprocate.org
https://list.resiprocate.org/mailman/listinfo/resiprocate-devel