Re: [PATCH] SMPP Online time
Nisan Bloch <[email protected]>
| Newsgroups | gmane.comp.mobile.kannel.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi part two of this patch: setting smpp->conn->connect_time = -1 in io_thread is a problem as well - one can then end up with an onlinetime of time() - (-1) the smscconn functions do this anyway nisan At 07:26 PM 2004/03/11, you wrote: >Nisan Bloch wrote: > > > > Patch to fix the SMPP online times bug. > > conn->connect_time is a share variable amongst threads and is not > protected. > > > > This patch works for us. (FYI the large online times one sees is the unix > > timestamp time) > >+1, while also the global conn status variable has to be locked in the >same manner. Applied patch in slightly modified way to cvs. Thanks >Nisan. > >Stipe > >mailto:[email protected] >------------------------------------------------------------------- >Wapme Systems AG > >Münsterstr. 248 >40470 Düsseldorf, NRW, Germany > >phone: +49.211.74845.0 >fax: +49.211.74845.299 > >mailto:[email protected] >http://www.wapme-systems.de/ >------------------------------------------------------------------- > >-----BEGIN PGP PUBLIC KEY BLOCK----- >Version: GnuPG v1.2.2 (Cygwin) > >mIsEP6mcYwEEAMDnUiUwrbb+xwTFWN6TxF2+XZu7/alwJMeCwMBRvXtPZqfjpPhS >OkBpU0F4TrVuugz1HINTSaJTYq10AzDQXp5NkyWgckqW79nPAWuOX0dicbJk+cN2 >nM2TI4KaxUDe6u8hghNEnH/i2lXsUu9apnP/iixzV81VC2je3uc9hZpnAAYptEVT >dGlwZSBUb2xqIChUZWNobm9sb2d5IENlbnRlciAmIFJlc2VhcmNoIExhYikgPHRv >bGpAd2FwbWUtc3lzdGVtcy5kZT6ItAQTAQIAHgUCP6mcYwIbAwYLCQgHAwIDFQID >AxYCAQIeAQIXgAAKCRABV0w1BqPYRuSqA/wPzsQxao2YePENCtgRTrO86U6zg3sl >OcS6CJFI4FZP5h/xD3GRsNH1+MPSvZlomDdpFnr547DGz/Kq9MXuQwVvlVig5yWZ >K5dtKp1r5YLhxJQBhfirZbRFFnYmf19f18J8OoS28tuFVftDl1AIwJS3HLyBTv6H >g2HyLAEKQIp30Q== >=aYCI >-----END PGP PUBLIC KEY BLOCK-----
smsc_smpp.patch
(text/plain, 429 B)
--- gw/smsc/smsc_smpp.c Thu Mar 11 19:47:10 2004
+++ ../../my-cvs/gw/smsc/smsc_smpp.c Thu Mar 11 19:46:47 2004
@@ -1426,9 +1426,6 @@
conn = NULL;
while (!smpp->quitting) {
- mutex_lock(smpp->conn->flow_mutex);
- smpp->conn->connect_time = -1;
- mutex_unlock(smpp->conn->flow_mutex);
if (transmitter == 1)
conn = open_transmitter(smpp);
else if (transmitter == 2)