RE: smpp reconnect bugfix

"Oded Arbel" <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <[email protected]>
> -----Original Message-----
> From: Stipe Tolj [mailto:[email protected]]

> > Yep - that's my problem. how about the following complicated logic:
> > whenever the receiver thread wants to change the status, it 
> will check
> > if it has a transmitter thread attached, and if so will do the
> > following:
> > if (its_safe_to_change_status()) {
> >         if (new_status = SMSCCONN_ACTIVE_RECV)
> >                 status = privdata->current_state
> >         else {
> >                 privdata->current_state = status;
> >                 status = new_status;
> >                 privdata->new_status = new_status;
> >         }
> > } else {
> >         deinit_privdata_status_variables();
> > }
> > 
> > its_safe_to_change_status() {
> >         if ( ! privdata_status_variables_have_been_inited)
> >                 return false;
> >         if (privdata->new_status == status)
> >                 return true;
> >         return false;
> > }
> > 


> Hmmm, I haven't understood the patch Oded. Can you point that a bit
> more out and tell us where it should be placed in the code?

It's not patch - just pseodo code to explain the logic that I thought about.

--
Oded Arbel
m-Wise mobile solutions
[email protected]

+972-9-9581711 (116)
+972-67-340014

::..
The trouble with heart disease is that the first symptom is often hard to
deal with: death.
		-- Michael Phelps
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.