* #23362 Modified swig interface for getHistory implementation

* #23361 Added log in siptransport.cpp
This commit is contained in:
alision
2013-04-25 14:37:39 -04:00
parent c84e6953ba
commit ac5b63f883
5 changed files with 22 additions and 4 deletions

View File

@ -10,3 +10,15 @@ dbusxx-xml2cpp configurationmanager-introspec.xml --adaptor=configurationmanager
dbusxx-xml2cpp contactmanager-introspec.xml --adaptor=contactmanager-glue.h
dbusxx-xml2cpp instance-introspec.xml --adaptor=instance-glue.h
Warning : depending on the dbusxx-xml2cpp version used, it can generate buggy code
code generated
::DBus::IntrospectedInterface *const introspect() const
instead of
::DBus::IntrospectedInterface *introspect() const
This issue is dealt with in make-swig.sh

View File

@ -117,7 +117,7 @@ public:
std::map<std::string, std::string> getHookSettings();
void setHookSettings(const std::map<std::string, std::string>& settings);
void setAccountsOrder(const std::string& order);
/*std::vector<std::map<std::string, std::string>> getHistory();*/
std::vector<std::map<std::string, std::string> > getHistory();
std::string getAddrFromInterfaceName(const std::string& interface);
std::vector<std::string> getAllIpInterface();
std::vector<std::string> getAllIpInterfaceByName();

View File

@ -58,6 +58,7 @@
namespace std {
%template(StringMap) map<string, string>;
%template(StringVect) vector<string>;
%template(VectMap) vector< map<string,string> >;
}
/* not parsed by SWIG but needed by generated C files */

View File

@ -118,9 +118,10 @@ void History::addEntry(const HistoryItem &item, int oldest)
void History::ensurePath()
{
if (path_.empty()) {
#ifdef ANDROID
#ifdef __ANDROID__
string xdg_data = path_;
DEBUG("xdg_data: %s!", xdg_data.c_str());
#else
string xdg_data = string(HOMEDIR) + DIR_SEPARATOR_STR + ".local/share/sflphone";
#endif
@ -140,7 +141,9 @@ void History::ensurePath()
}
// Load user's history
path_ = userdata + DIR_SEPARATOR_STR + "history";
}
DEBUG("path_: %s!", path_.c_str());
}
vector<map<string, string> > History::getSerialized()

View File

@ -393,6 +393,8 @@ SipTransport::createUdpTransport(const std::string &interface, unsigned int port
pj_status_t status;
pjsip_transport *transport = NULL;
DEBUG("Try to create Transport for %s:%d", interface.c_str(), port);
if (boundAddr.addr.sa_family == pj_AF_INET()) {
status = pjsip_udp_transport_start(endpt_, &boundAddr.ipv4, NULL, 1, &transport);
RETURN_IF_FAIL(status == PJ_SUCCESS, NULL, "UDP IPV4 Transport did not start");