summaryrefslogtreecommitdiff
path: root/pjlib
diff options
context:
space:
mode:
authorNanang Izzuddin <nanang@teluu.com>2008-12-17 11:36:22 +0000
committerNanang Izzuddin <nanang@teluu.com>2008-12-17 11:36:22 +0000
commitb6529acff90535f3f54b57d093bae7bc90139bff (patch)
tree09d7778c480c91aafd46fec12995db3d43297b0e /pjlib
parent3b1adf8c9c943ef6c7f8166f4633f88cabb23e99 (diff)
Ticket #675:
- Fixed ICE+STUN panic E32User-CBASE 46, the problem seems to be inside the Symbian version of pjsua_handle_events(). - Updated minor things, e.g: compile warnings git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2379 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjlib')
-rw-r--r--pjlib/src/pj/ioqueue_symbian.cpp2
-rw-r--r--pjlib/src/pj/os_core_symbian.cpp19
-rw-r--r--pjlib/src/pj/os_symbian.h2
-rw-r--r--pjlib/src/pj/sock_symbian.cpp3
-rw-r--r--pjlib/src/pj/timer_symbian.cpp3
5 files changed, 10 insertions, 19 deletions
diff --git a/pjlib/src/pj/ioqueue_symbian.cpp b/pjlib/src/pj/ioqueue_symbian.cpp
index 1fa25085..4d534171 100644
--- a/pjlib/src/pj/ioqueue_symbian.cpp
+++ b/pjlib/src/pj/ioqueue_symbian.cpp
@@ -525,7 +525,7 @@ PJ_DEF(pj_status_t) pj_ioqueue_unregister( pj_ioqueue_key_t *key )
return PJ_SUCCESS;
// Cancel pending async object
- if (key->cbObj && key->cbObj->IsActive()) {
+ if (key->cbObj) {
key->cbObj->Cancel();
}
diff --git a/pjlib/src/pj/os_core_symbian.cpp b/pjlib/src/pj/os_core_symbian.cpp
index 7718e6e8..3035bd72 100644
--- a/pjlib/src/pj/os_core_symbian.cpp
+++ b/pjlib/src/pj/os_core_symbian.cpp
@@ -89,8 +89,7 @@ CPjTimeoutTimer::CPjTimeoutTimer()
CPjTimeoutTimer::~CPjTimeoutTimer()
{
- if (IsActive())
- Cancel();
+ Cancel();
timer_.Close();
}
@@ -115,8 +114,7 @@ CPjTimeoutTimer *CPjTimeoutTimer::NewL()
void CPjTimeoutTimer::StartTimer(TUint miliSeconds)
{
- if (IsActive())
- Cancel();
+ Cancel();
hasTimedOut_ = PJ_FALSE;
timer_.After(iStatus, miliSeconds * 1000);
@@ -329,7 +327,7 @@ PJ_DEF(pj_status_t) pj_init(void)
TInt err;
err = os->Initialize();
if (err != KErrNone)
- return status;
+ return PJ_RETURN_OS_ERROR(err);
/* Initialize exception ID for the pool.
* Must do so after critical section is configured.
@@ -452,7 +450,7 @@ PJ_DEF(pj_bool_t) pj_symbianos_poll(int priority, int ms_timeout)
CPollTimeoutTimer *timer = NULL;
if (priority==-1)
- priority = CActive::EPriorityStandard;
+ priority = EPriorityNull;
if (ms_timeout >= 0) {
timer = CPollTimeoutTimer::NewL(ms_timeout, priority);
@@ -463,8 +461,7 @@ PJ_DEF(pj_bool_t) pj_symbianos_poll(int priority, int ms_timeout)
if (timer) {
bool timer_is_active = timer->IsActive();
- if (timer_is_active)
- timer->Cancel();
+ timer->Cancel();
delete timer;
@@ -622,11 +619,7 @@ PJ_DEF(pj_status_t) pj_thread_destroy(pj_thread_t *rec)
PJ_DEF(pj_status_t) pj_thread_sleep(unsigned msec)
{
User::After(msec*1000);
-
- TInt aError;
- while (CActiveScheduler::RunIfReady(aError, EPriorityMuchLess))
- ;
-
+
return PJ_SUCCESS;
}
diff --git a/pjlib/src/pj/os_symbian.h b/pjlib/src/pj/os_symbian.h
index be7fdb55..9fa3aae4 100644
--- a/pjlib/src/pj/os_symbian.h
+++ b/pjlib/src/pj/os_symbian.h
@@ -347,7 +347,7 @@ public:
void WaitForActiveObjects(TInt aPriority = CActive::EPriorityStandard)
{
TInt aError;
- User::WaitForAnyRequest();
+ CActiveScheduler::Current()->WaitForAnyRequest();
CActiveScheduler::RunIfReady(aError, aPriority);
}
diff --git a/pjlib/src/pj/sock_symbian.cpp b/pjlib/src/pj/sock_symbian.cpp
index 89c37236..18d0697f 100644
--- a/pjlib/src/pj/sock_symbian.cpp
+++ b/pjlib/src/pj/sock_symbian.cpp
@@ -101,8 +101,7 @@ CPjSocketReader *CPjSocket::CreateReader(unsigned max_len)
void CPjSocket::DestroyReader()
{
if (sockReader_) {
- if (sockReader_->IsActive())
- sockReader_->Cancel();
+ sockReader_->Cancel();
delete sockReader_;
sockReader_ = NULL;
}
diff --git a/pjlib/src/pj/timer_symbian.cpp b/pjlib/src/pj/timer_symbian.cpp
index 20fc85b3..b61e667d 100644
--- a/pjlib/src/pj/timer_symbian.cpp
+++ b/pjlib/src/pj/timer_symbian.cpp
@@ -78,8 +78,7 @@ CPjTimerEntry::CPjTimerEntry(pj_timer_heap_t *timer_heap,
CPjTimerEntry::~CPjTimerEntry()
{
- if (IsActive())
- Cancel();
+ Cancel();
rtimer_.Close();
}