diff options
author | Benny Prijono <bennylp@teluu.com> | 2007-05-02 18:54:19 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2007-05-02 18:54:19 +0000 |
commit | faede3bfd55af757bd3b76b075d435d6b31b2c0f (patch) | |
tree | badc8973453990054ecbc923e5c80cc23f628d6b /pjsip-apps | |
parent | 4b5a9b5ec7f7dd042d7fb40bccdf4ee44d28122b (diff) |
Errno and memory size tweaking for Symbian
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1244 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip-apps')
-rw-r--r-- | pjsip-apps/src/symbian_ua/main_symbian.cpp | 47 | ||||
-rw-r--r-- | pjsip-apps/src/symbian_ua/ua.cpp | 3 |
2 files changed, 49 insertions, 1 deletions
diff --git a/pjsip-apps/src/symbian_ua/main_symbian.cpp b/pjsip-apps/src/symbian_ua/main_symbian.cpp index a90ea167..640fb2d4 100644 --- a/pjsip-apps/src/symbian_ua/main_symbian.cpp +++ b/pjsip-apps/src/symbian_ua/main_symbian.cpp @@ -132,9 +132,54 @@ LOCAL_C void DoStartL() } +//////////////////////////////////////////////////////////////////////////// + +class TMyTrapHandler : public TTrapHandler +{ +public: + void Install(); + void Uninstall(); + virtual IMPORT_C void Trap(); + virtual IMPORT_C void UnTrap(); + virtual IMPORT_C void Leave(TInt aValue); + +private: + TTrapHandler *prev_; +}; + +void TMyTrapHandler::Install() { + prev_ = User::SetTrapHandler(this); +} + +void TMyTrapHandler::Uninstall() { + User::SetTrapHandler(prev_); +} + +IMPORT_C void TMyTrapHandler::Trap() +{ + prev_->Trap(); +} + +IMPORT_C void TMyTrapHandler::UnTrap() +{ + prev_->UnTrap(); +} + +IMPORT_C void TMyTrapHandler::Leave(TInt aValue) +{ + prev_->Leave(aValue); +} + + +//////////////////////////////////////////////////////////////////////////// + // Global Functions GLDEF_C TInt E32Main() { + TMyTrapHandler th; + + th.Install(); + // Create cleanup stack //__UHEAP_MARK; CTrapCleanup* cleanup = CTrapCleanup::New(); @@ -152,6 +197,8 @@ GLDEF_C TInt E32Main() delete console; delete cleanup; //__UHEAP_MARKEND; + + th.Uninstall(); return KErrNone; } diff --git a/pjsip-apps/src/symbian_ua/ua.cpp b/pjsip-apps/src/symbian_ua/ua.cpp index 8044226d..cc224563 100644 --- a/pjsip-apps/src/symbian_ua/ua.cpp +++ b/pjsip-apps/src/symbian_ua/ua.cpp @@ -301,7 +301,7 @@ int ua_main() pj_status_t status; // Initialize pjsua - status = app_startup(NULL); + status = app_startup("sip:192.168.0.66:5061"); if (status != PJ_SUCCESS) return status; @@ -311,6 +311,7 @@ int ua_main() ConsoleUI *con = new ConsoleUI(asw, console); con->Run(); + asw->Start(); delete con; |