David,

I left the ControlCommon.h as below:

class Pager {

    private:

    std::list<PagingEntry> mPageIDs;         ///< List of ID's to be paged.;
    std::list<PagingEntry> PagingEntryList;
    Mutex mLock;                            ///< Lock for thread-safe access.
    ....

Now I'm getting this output:

RadioResource.cpp: In member function 'unsigned int Control::Pager::pageAll()':
RadioResource.cpp:286: error: 'PagingEntryList' is not a class or namespace
RadioResource.cpp:286: error: expected `;' before 'lp'
RadioResource.cpp:287: error: 'lp' was not declared in this scope
make[2]: *** [RadioResource.lo] Error 1
make[2]: Leaving directory `/home/alex/openbts-1.6/Control'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/alex/openbts-1.6'
make: *** [all] Error 2

Am I doing something wrong?

Tks,
Alex



2009/1/27 David Burgess <dburgess@kestrelsp.com>
Alex -

Sorry.  PagingEntryList is just a typedef of std::list<PagingEntry>.  You can define it in Control/ControlCommon.h.

-- David


On Jan 27, 2009, at 8:39 AM, Alexsander Loula wrote:

Hi David,

I'm getting this problem on MT transactions. I have tried to apply this modification without success:

RadioResource.cpp: In member function 'unsigned int Control::Pager::pageAll()':
RadioResource.cpp:286: error: 'PagingEntryList' has not been declared
RadioResource.cpp:286: error: expected `;' before 'lp'
RadioResource.cpp:287: error: 'lp' was not declared in this scope
make[2]: *** [RadioResource.lo] Error 1
make[2]: Leaving directory `/home/alex/openbts-1.6/Control'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/alex/openbts-1.6'
make: *** [all] Error 2

This is how it's on RadioResource.cpp:

    // Clear expired entries.
    //for (list<PagingEntry>::iterator lp = mPageIDs.begin(); lp != mPageIDs.end(); ++lp) {
    //    if (!lp->expired()) continue;
    //    CLDCOUT("Pager::pageAll erasing " << lp->ID());
    //    mPageIDs.erase(lp);       
        // FIXME -- We should delete the Transaction Table entry here.
    //}

    // Clear expired entries.
    PagingEntryList::iterator lp = mPageIDs.begin();
    while (lp != mPageIDs.end()) {
        if (!lp->expired()) ++lp;
        else {
            CLDCOUT("Pager::pageAll erasing " << lp->ID());
            lp=mPageIDs.erase(lp);
            // FIXME -- We should delete the corresponding Transaction Table entry here, too.
        }
    }

Any suggestion?

Tks,
Alex

2009/1/24 David Burgess <dburgess@kestrelsp.com>
All -

There is a bug in the Pager class that dereferences a stale iterator,
causing a segfault on some systems during mobile-terminated
transactions.

The old broken code, in Pager::pageAll in Control/RadioResource.cpp, is:

>     // Clear expired entries.
>     for (list<PagingEntry>::iterator lp = mPageIDs.begin(); lp !=
> mPageIDs.end(); ++lp) {
>         if (!lp->expired()) continue;
>         CLDCOUT("Pager::pageAll erasing " << lp->ID());
>         mPageIDs.erase(lp);
>         // FIXME -- We should delete the Transaction Table entry here.
>     }
>

The new fixed code, with list<PagingEntry> typedef'd to
PagingEntryList, is:

>     // Clear expired entries.
>     PagingEntryList::iterator lp = mPageIDs.begin();
>     while (lp != mPageIDs.end()) {
>         if (!lp->expired()) ++lp;
>         else {
>             CLDCOUT("Pager::pageAll erasing " << lp->ID());
>             lp=mPageIDs.erase(lp);
>             // FIXME -- We should delete the corresponding
> Transaction Table entry here, too.
>         }
>     }
>

This is not yet fixed in the GNU Radio distribution.

-- David



David A. Burgess
Kestrel Signal Processing, Inc.





------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Openbts-discuss mailing list
Openbts-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbts-discuss

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
Openbts-discuss mailing list


David A. Burgess
Kestrel Signal Processing, Inc.