Re: Unsure about trivial patch
Alexander Malysh <[email protected]>
| Newsgroups | gmane.comp.mobile.kannel.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi, this is wrong... we want protect our smsc_list for writers (in this case for threads that may remove smscconn struct from list while we still use it)... Enver ALTIN wrote: > Hi, > > I was looking at the code and just noticed this, but I'm not really sure > if it's a valid fix. > > Index: bb_smscconn.c > =================================================================== > RCS file: /home/cvs/gateway/gw/bb_smscconn.c,v > retrieving revision 1.79 > diff -u -p -d -r1.79 bb_smscconn.c > --- bb_smscconn.c 28 Aug 2004 18:09:19 -0000 1.79 > +++ bb_smscconn.c 10 Sep 2004 13:38:12 -0000 > @@ -880,6 +880,7 @@ int smsc2_rout(Msg *msg) > gw_rwlock_unlock(&smsc_list_lock); > return SMSCCONN_FAILED_DISCARDED; > } > + gw_rwlock_unlock(&smsc_list_lock); > > s = gw_rand() % list_len(smsc_list); > best_preferred = best_ok = NULL; > > -- Thanks, Alex