some code paths in presence module set the `reason` field to null causing problems updating the database. You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/1345
-- Commit Summary --
* schema: allow null in active_watchers reason
-- File Changes --
M src/lib/srdb1/schema/pr_active_watchers.xml (1)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/1345.patch https://github.com/kamailio/kamailio/pull/1345.diff
Many columns default to empty string because the code expect it and doesn't do additional checks to see if the db value is NULL. Have you checked the code for this case?
@miconda on new dialog subscribes the value is null. we can either add a `default` or allow null
Have you tested with the updated schema and it works?
Hi Daniel,
only with sqlite which uses kamailio db routines to generate the actual sql statement. i can try others or, maybe i'm missing something basic in sqlite.
On Wed, Nov 29, 2017 at 2:57 PM, Daniel-Constantin Mierla < notifications@github.com> wrote:
Have you tested with the updated schema and it works?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/kamailio/kamailio/pull/1345#issuecomment-347885301, or mute the thread https://github.com/notifications/unsubscribe-auth/AAvDrKirdug78Mq7Wi19QMcVUIOQzoBOks5s7XDEgaJpZM4QuuDc .
I checked mysql and it doesn't allow NULL -- if some parts of the code sets it to NULL, then it should have been an error as well. Can you point to such code?
I am fine to change it to allow NULL, just to be sure there is no side effect.
@miconda hi Daniel, follow the code path of handle_subscribe in presence/subscriber.c that leads to `update_subscription` - new subscription - pres_notifier_processes = 0 - dialog subscription => event->req_auth == 0
this code doesn't change the value its null by default, the code path with req_auth != 0, ~line 1202 does set it explicitly to null before calling the subscription handler.
Merged #1345.