< Previous by Date Date Index Next by Date >
< Previous in Thread Thread Index  

Re: [reSIProcate-users] Meet problem getting user() outof Uri. resip 1.8.7


Scott,
  Thanks for your fast response.

  I found why the earlier problem occurred. It is because I was compiling and linking my program with the "-D_GLIBCXX_DEBUG" flag. ( I simply copied this flag from the make printout during building of resip, it turned out to be a bad idea:) )

  Problem disappeared after removing that flag.

Cheers,
Shaohong
 


2013/4/25 Shaohong Li <shaohong0830@xxxxxxxxx>
Hi, all,

  I'm using the latest 1.8.7 tar ball download

  I'm wondering if I'm doing anything wrong with Uri here. The logic is quite trivial but somehow I couldn't get user part out of the Uri and the host info returned is also wrong. Below is my code:

------------------
#include <resip/stack/Uri.hxx>
#include <rutil/Data.hxx>
#include <iostream>

using namespace resip;
using namespace std;

int main() {
    Uri bobUri("sip:bob@xxxxxxxxxxx");
    cout << "bobUri.user(): " << bobUri.user() << endl;
    cout << "bobUri.host(): " << bobUri.host() << endl;
}

------------------

and the output is like:
  bobUri.user():
  bobUri.host(): bob

  Any pointers or suggestions are appreciated. Thanks!

Regards,
Shaohong