ejabberd - Comments for "mod_last_odbc question for state column" https://www.ejabberd.im/node/4693 en Thank you https://www.ejabberd.im/node/4693#comment-57368 <p>I have my own client app. I was setting the presence to unavailable and disconnecting the socket to server.<br /> If I don't use the disconnection and let the type="unavailable" do the job, everything works fine.<br /> Thanks for all your help Badlop. You've been really helpful with all of my questions.</p> Fri, 20 May 2011 01:23:43 +0000 kamila comment 57368 at https://www.ejabberd.im Check your clients really send the state https://www.ejabberd.im/node/4693#comment-57360 <div class="quote-msg"> <div class="quote-author"><em>kamila</em> wrote:</div> <p>State (Status) column is not being updated at all. I've tried this with many clients and many variations.</p></div> <p>I've tried with ejabberd 2.1.6 and 2.1.x, and Tkabber. I can't find in Psi or Gajim anyway to logout with a status.</p> <p>When I tell Tkabber to logout with a specific reason, my client sends to ejabberd:</p> <pre> &lt;presence type='unavailable'&gt; &lt;priority&gt;8&lt;priority&gt; &lt;status&gt;testing the disconnection reason&lt;status&gt; &lt;presence&gt; </pre><p> Looking at the calls made by ejabberd, I see this:</p> <pre> odbc_queries:set_last_t("odbc.localhost", "badlop", "1305797344", "testing the disconnection reason"). </pre><p> Finally, the table stores the state correctly:</p> <pre> mysql&gt; SELECT * FROM last; +----------+------------+----------------------------------+ | username | seconds | state | +----------+------------+----------------------------------+ | badlop | 1305797344 | testing the disconnection reason | | badlop2 | 1305358845 | | +----------+------------+----------------------------------+ 2 rows in set (0.00 sec) </pre> Thu, 19 May 2011 09:44:37 +0000 mfoss comment 57360 at https://www.ejabberd.im Thanks for the info badlop. https://www.ejabberd.im/node/4693#comment-57358 <p>Thanks for the info badlop. But, I think I have found a problem on mod_last_odbc module.<br /> State (Status) column is not being updated at all. I've tried this with many clients and many variations.</p> <p>I don't know if this part of code has something to do with it:</p> <div class="codeblock"><code>set_last_t(LServer, Username, Seconds, State) -&gt;<br />&nbsp;&nbsp;&nbsp; update(LServer, &quot;last&quot;, [&quot;username&quot;, &quot;seconds&quot;, &quot;state&quot;],<br /> &nbsp;&nbsp; [Username, Seconds, State],<br /> &nbsp;&nbsp; [&quot;username=&#039;&quot;, Username, &quot;&#039;&quot;]).</code></div> Thu, 19 May 2011 01:28:29 +0000 kamila comment 57358 at https://www.ejabberd.im kamila wrote: Could someone https://www.ejabberd.im/node/4693#comment-57345 <div class="quote-msg"> <div class="quote-author"><em>kamila</em> wrote:</div> <p>Could someone explain what <strong>state</strong> column is used for on mod_last?<br /> Currently, it's not being used and always empty/null. </p></div> <p>See <noindex><a href="http://xmpp.org/extensions/xep-0012.html#example-5" title="http://xmpp.org/extensions/xep-0012.html#example-5" rel="nofollow" >http://xmpp.org/extensions/xep-0012.html#example-5</a></noindex></p> Tue, 17 May 2011 11:14:43 +0000 mfoss comment 57345 at https://www.ejabberd.im