<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
On 07/21/2011 08:21 AM, Daniel-Constantin Mierla wrote:
<blockquote cite="mid:4E27C56A.2040707@gmail.com" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
Hello,<br>
<br>
indeed there was some inconsistency. I just committed a patch to
store empty string if the sender parameter is not set. That for
the fact that later (about line 450) there is a query and the
sender value is taken from db and strlen used. All over, these
checks are used for SLA/BLA case.<br>
</blockquote>
<br>
Could you please send me the diff so that I can apply it to my local
v3.1.4 <br>
for rebuilding the rpms?<br>
<br>
<blockquote cite="mid:4E27C56A.2040707@gmail.com" type="cite"> <br>
Cheers,<br>
Daniel<br>
<br>
On 7/20/11 7:00 PM, Bucur Marius wrote:
<blockquote
cite="mid:1311181206.38507.YahooMailNeo@web29707.mail.ird.yahoo.com"
type="cite">
<div style="color:#000; background-color:#fff;
font-family:arial, helvetica, sans-serif;font-size:12pt">
<div style="font-family: arial, helvetica, sans-serif;
font-size: 12pt; "><span>Hi,</span></div>
<div style="font-family: arial, helvetica, sans-serif;
font-size: 12pt; "><span><br>
</span></div>
<div style="font-family: arial, helvetica, sans-serif;
font-size: 12pt; "><span>It think there is something wrong
with the sql scripts, hence the code obviously accepts a
null sender.</span></div>
<div style="font-family: arial, helvetica, sans-serif;
font-size: 12pt; "><span><br>
</span></div>
<div style="font-family: arial, helvetica, sans-serif;
font-size: 12pt; "><span>presentity.c:357</span></div>
<div><span>
<div><span class="Apple-tab-span" style="white-space:pre">
</span>if( presentity->sender)</div>
<div><span class="Apple-tab-span" style="white-space:pre">
</span>{</div>
<div><span class="Apple-tab-span" style="white-space:pre">
</span>query_cols[n_query_cols] = &str_sender_col;</div>
<div><span class="Apple-tab-span" style="white-space:pre">
</span>query_vals[n_query_cols].type = DB1_STR;</div>
<div><span class="Apple-tab-span" style="white-space:pre">
</span>query_vals[n_query_cols].nul = 0;</div>
<div><span class="Apple-tab-span" style="white-space:pre">
</span>query_vals[n_query_cols].val.str_val.s =
presentity->sender->s;</div>
<div><span class="Apple-tab-span" style="white-space:pre">
</span>query_vals[n_query_cols].val.str_val.len =
presentity->sender->len;</div>
<div><span class="Apple-tab-span" style="white-space:pre">
</span>n_query_cols++;</div>
<div><span class="Apple-tab-span" style="white-space: pre;
"> </span>}</div>
<div><br>
</div>
<div>From a logical point of view, I believe the sender
should not be mandatory hence it could be generated by a
machine - whose identity/location is not needed.</div>
<div><br>
</div>
<div>Regards,</div>
<div>Marius</div>
</span></div>
<div style="font-family: arial, helvetica, sans-serif;
font-size: 12pt; "><br>
</div>
<div style="font-size: 12pt; font-family: arial, helvetica,
sans-serif; ">
<div style="font-size: 12pt; font-family: 'times new roman',
'new york', times, serif; "><font face="Arial" size="2">
<hr size="1"><b><span style="font-weight:bold;">From:</span></b>
Daniel-Constantine Mierla <a moz-do-not-send="true"
class="moz-txt-link-rfc2396E"
href="mailto:miconda@gmail.com"><miconda@gmail.com></a><br>
<b><span style="font-weight: bold;">To:</span></b> SIP
Router - Kamailio (OpenSER) and SIP Express Router (SER)
-Users Mailing List <a moz-do-not-send="true"
class="moz-txt-link-rfc2396E"
href="mailto:sr-users@lists.sip-router.org"><sr-users@lists.sip-router.org></a><br>
<b><span style="font-weight: bold;">Cc:</span></b> SIP
Router - Kamailio (OpenSER) and SIP Express Router (SER)
- UsersMailing List <a moz-do-not-send="true"
class="moz-txt-link-rfc2396E"
href="mailto:sr-users@lists.sip-router.org"><sr-users@lists.sip-router.org></a><br>
<b><span style="font-weight: bold;">Sent:</span></b>
Wednesday, July 20, 2011 6:53 PM<br>
<b><span style="font-weight: bold;">Subject:</span></b>
Re: [SR-Users] Kamailio presence server problem with
PostgreSQL<br>
</font><br>
Hello,<br>
<br>
Thanks for troubleshooting further. What intrigues me is
that the error message from syslog is printed from store
result function, which is used after doing a select query.
So something else might have to be reviewed as well.<br>
<br>
Anyhow, missing sender value should be checked, since it
is a constraint for non-null. Interesting it was not risen
with mysql.<br>
<br>
Cheers,<br>
Daniel<br>
<br>
On Jul 20, 2011, at 5:46 PM, Roberto Fichera <<a
moz-do-not-send="true"
ymailto="mailto:kernel@tekno-soft.it"
href="mailto:kernel@tekno-soft.it">kernel@tekno-soft.it</a>>
wrote:<br>
<br>
> On 07/20/2011 05:34 PM, Roberto Fichera wrote:<br>
>> On 07/20/2011 05:18 PM, Klaus Darilion wrote:<br>
>>> Am 20.07.2011 17:00, schrieb Roberto Fichera:<br>
>>>> ERROR: null value in column "sender"
violates not-null constraint<br>
>>>> STATEMENT: insert into presentity<br>
>>>>
(domain,username,event,etag,expires,body,received_time )
values<br>
>>>>
('192.168.2.92','roberto','presence','a.1311173612.4970.2.0',1311177224,'<?xml<br>
>>>> version="1.0" encoding="UTF-8"
standalone="no"?><presence<br>
>>>> xmlns="urn:ietf:params:xml:ns:pidf"<br>
>>>>
xmlns:dm="urn:ietf:params:xml:ns:pidf:data-model"<br>
>>>>
xmlns:rpid="urn:ietf:params:xml:ns:pidf:rpid"<br>
>>>> entity=<a moz-do-not-send="true"
class="moz-txt-link-rfc2396E"
href="sip:roberto@192.168.2.92">"sip:roberto@192.168.2.92"</a>><dm:person<br>
>>>>
id="p3619"><rpid:activities/></dm:person><tuple<br>
>>>>
id="t9285"><status><basic>open</basic></status><contact><a
moz-do-not-send="true" class="moz-txt-link-freetext"
href="sip:roberto@192.168.2.92">sip:roberto@192.168.2.92</a></contact><note>Online</note></tuple></presence>',1311173624)<br>
>>> Seems like the statement does not insert the
"sender" although it is<br>
>>> mandatory. If "sender" is really mandatory,
then it seems the statement<br>
>>> is buggy.<br>
>> how does look the corresponding presentity mysql
table, does it has the same<br>
>> constraint or not?<br>
> <br>
> Anyway I can confirm that removing the constraint the
problem<br>
> of presence backed by postgresql seems solved.<br>
> <br>
>> <br>
>>> regards<br>
>>> Klaus<br>
>>> <br>
>>>
_______________________________________________<br>
>>> SIP Express Router (SER) and Kamailio
(OpenSER) - sr-users mailing list<br>
>>> <a moz-do-not-send="true"
ymailto="mailto:sr-users@lists.sip-router.org"
href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
>>> <a moz-do-not-send="true"
href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users"
target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
>>> <br>
>> <br>
>> _______________________________________________<br>
>> SIP Express Router (SER) and Kamailio (OpenSER) -
sr-users mailing list<br>
>> <a moz-do-not-send="true"
ymailto="mailto:sr-users@lists.sip-router.org"
href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
>> <a moz-do-not-send="true"
href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users"
target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
>> <br>
> <br>
> <br>
> _______________________________________________<br>
> SIP Express Router (SER) and Kamailio (OpenSER) -
sr-users mailing list<br>
> <a moz-do-not-send="true"
ymailto="mailto:sr-users@lists.sip-router.org"
href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
> <a moz-do-not-send="true"
href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users"
target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br>
_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users
mailing list<br>
<a moz-do-not-send="true"
ymailto="mailto:sr-users@lists.sip-router.org"
href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
<a moz-do-not-send="true"
href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users"
target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br>
<br>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla -- <a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
Kamailio Advanced Training, Oct 10-13, Berlin: <a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://asipto.com/u/kat">http://asipto.com/u/kat</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://linkedin.com/in/miconda">http://linkedin.com/in/miconda</a> -- <a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://twitter.com/miconda">http://twitter.com/miconda</a></pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<br>
</body>
</html>