On 12/10/14 10:23, Juha Heinanen wrote:
Daniel-Constantin Mierla writes:
Haven't used it in db_mode=2, but given that
pua is an user-agent
emulator, it is a matter of interaction from other modules as well. So
far, the main usage in my side is for publishing dialog-info states,
which works very well.
i have not detected any problems with presence module that
pua is
interacting with in my test.
I had in mind that presence modules needed always
to keep references in
cache, but then I assume now that the db only mode lacks proper
constraints in working with database, which should be easy to fix.
there must be
some bug in publ_cback_func() that causes update of wrong
record instead of inserting a new one.
Looking quickly over the code, I think that
queries on pua table must
include the etag always. IIRC, SIP-ETag is returned in 200ok for PUBLISH
and database table 'pua' has the definition with:
etag VARCHAR(64) NOT NULL,
Therefore, when the record is inserted, the etag must be known (since it
is not null). Further updates, should be done using etag in the key.
Based on above, the function update_record_puadb() should return without
doing the db update if pres->etag.s is not set. It should end up in an
insert if pres->etag.s is not set.
Cheers,
Daniel
--
Daniel-Constantin Mierla
http://twitter.com/#!/miconda -
http://www.linkedin.com/in/miconda