summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pjmedia/src/pjmedia/conf_switch.c2
-rw-r--r--pjmedia/src/pjmedia/wav_player.c1
-rw-r--r--pjsip-apps/src/python/setup-vc.py38
-rw-r--r--pjsip-apps/src/python/setup.py37
-rw-r--r--pjsip/src/pjsua-lib/pjsua_core.c12
-rw-r--r--version.mak1
6 files changed, 74 insertions, 17 deletions
diff --git a/pjmedia/src/pjmedia/conf_switch.c b/pjmedia/src/pjmedia/conf_switch.c
index 269405da..85a884c5 100644
--- a/pjmedia/src/pjmedia/conf_switch.c
+++ b/pjmedia/src/pjmedia/conf_switch.c
@@ -546,7 +546,7 @@ PJ_DEF(pj_status_t) pjmedia_conf_connect_port( pjmedia_conf *conf,
/* Channel count must match. */
if (src_afd->channel_count != dst_afd->channel_count) {
pj_mutex_unlock(conf->mutex);
- return PJMEDIA_ENCCLOCKRATE;
+ return PJMEDIA_ENCCHANNEL;
}
/* Source and sink ptime must be equal or a multiplication factor. */
diff --git a/pjmedia/src/pjmedia/wav_player.c b/pjmedia/src/pjmedia/wav_player.c
index a089ee16..e7084f86 100644
--- a/pjmedia/src/pjmedia/wav_player.c
+++ b/pjmedia/src/pjmedia/wav_player.c
@@ -157,6 +157,7 @@ static pj_status_t fill_buffer(struct file_reader_port *fport)
int val = pjmedia_linear2alaw(0);
pj_memset(fport->eofpos, val, size_left);
}
+ size_left = 0;
}
/* Rewind file */
diff --git a/pjsip-apps/src/python/setup-vc.py b/pjsip-apps/src/python/setup-vc.py
index 755058aa..82c5475a 100644
--- a/pjsip-apps/src/python/setup-vc.py
+++ b/pjsip-apps/src/python/setup-vc.py
@@ -24,17 +24,43 @@ import sys
# Find version
pj_version=""
-f = open('../../../pjlib/src/pj/config.c', 'r')
+pj_version_major=""
+pj_version_minor=""
+pj_version_rev=""
+pj_version_suffix=""
+f = open('../../../version.mak', 'r')
for line in f:
- if line.find("PJ_VERSION") != -1:
- pj_version = line.split("=")[1].strip('";\r\n ')
- break
+ if line.find("export PJ_VERSION_MAJOR") != -1:
+ tokens=line.split("=")
+ if len(tokens)>1:
+ pj_version_major= tokens[1].strip()
+ elif line.find("export PJ_VERSION_MINOR") != -1:
+ tokens=line.split("=")
+ if len(tokens)>1:
+ pj_version_minor= line.split("=")[1].strip()
+ elif line.find("export PJ_VERSION_REV") != -1:
+ tokens=line.split("=")
+ if len(tokens)>1:
+ pj_version_rev= line.split("=")[1].strip()
+ elif line.find("export PJ_VERSION_SUFFIX") != -1:
+ tokens=line.split("=")
+ if len(tokens)>1:
+ pj_version_suffix= line.split("=")[1].strip()
+
f.close()
-if pj_version=="":
- print 'Unable to get PJ_pj_version'
+if not pj_version_major:
+ print 'Unable to get PJ_VERSION_MAJOR'
sys.exit(1)
+
+pj_version = pj_version_major + "." + pj_version_minor
+if pj_version_rev:
+ pj_version += "." + pj_version_rev
+if pj_version_suffix:
+ pj_version += "-" + pj_version_suffix
+
#print 'PJ_VERSION = "'+ pj_version + '"'
+
# Check that extension has been built
if not os.access('../../lib/_pjsua.pyd', os.R_OK):
print 'Error: file "../../lib/_pjsua.pyd" does not exist!'
diff --git a/pjsip-apps/src/python/setup.py b/pjsip-apps/src/python/setup.py
index 43e4ef7e..6e3618d5 100644
--- a/pjsip-apps/src/python/setup.py
+++ b/pjsip-apps/src/python/setup.py
@@ -25,15 +25,40 @@ import platform
# find pjsip version
pj_version=""
-f = open('../../../pjlib/src/pj/config.c', 'r')
+pj_version_major=""
+pj_version_minor=""
+pj_version_rev=""
+pj_version_suffix=""
+f = open('../../../version.mak', 'r')
for line in f:
- if line.find("PJ_VERSION") != -1:
- pj_version= line.split(" = ")[1].strip('";\r\n')
- break
+ if line.find("export PJ_VERSION_MAJOR") != -1:
+ tokens=line.split("=")
+ if len(tokens)>1:
+ pj_version_major= tokens[1].strip()
+ elif line.find("export PJ_VERSION_MINOR") != -1:
+ tokens=line.split("=")
+ if len(tokens)>1:
+ pj_version_minor= line.split("=")[1].strip()
+ elif line.find("export PJ_VERSION_REV") != -1:
+ tokens=line.split("=")
+ if len(tokens)>1:
+ pj_version_rev= line.split("=")[1].strip()
+ elif line.find("export PJ_VERSION_SUFFIX") != -1:
+ tokens=line.split("=")
+ if len(tokens)>1:
+ pj_version_suffix= line.split("=")[1].strip()
+
f.close()
-if pj_version=="":
- print 'Unable to get PJ_VERSION'
+if not pj_version_major:
+ print 'Unable to get PJ_VERSION_MAJOR'
sys.exit(1)
+
+pj_version = pj_version_major + "." + pj_version_minor
+if pj_version_rev:
+ pj_version += "." + pj_version_rev
+if pj_version_suffix:
+ pj_version += "-" + pj_version_suffix
+
#print 'PJ_VERSION = "'+ pj_version + '"'
diff --git a/pjsip/src/pjsua-lib/pjsua_core.c b/pjsip/src/pjsua-lib/pjsua_core.c
index 02809efb..1e4bc7ff 100644
--- a/pjsip/src/pjsua-lib/pjsua_core.c
+++ b/pjsip/src/pjsua-lib/pjsua_core.c
@@ -2194,7 +2194,7 @@ PJ_DEF(pj_status_t) pjsua_transport_get_info( pjsua_transport_id id,
PJSUA_LOCK();
- if (pjsua_var.tpdata[id].type == PJSIP_TRANSPORT_UDP) {
+ if (t->type == PJSIP_TRANSPORT_UDP) {
pjsip_transport *tp = t->data.tp;
@@ -2215,7 +2215,9 @@ PJ_DEF(pj_status_t) pjsua_transport_get_info( pjsua_transport_id id,
status = PJ_SUCCESS;
- } else if (pjsua_var.tpdata[id].type == PJSIP_TRANSPORT_TCP) {
+ } else if (t->type == PJSIP_TRANSPORT_TCP ||
+ t->type == PJSIP_TRANSPORT_TLS)
+ {
pjsip_tpfactory *factory = t->data.factory;
@@ -2226,8 +2228,10 @@ PJ_DEF(pj_status_t) pjsua_transport_get_info( pjsua_transport_id id,
info->id = id;
info->type = t->type;
- info->type_name = pj_str("TCP");
- info->info = pj_str("TCP transport");
+ info->type_name = (t->type==PJSIP_TRANSPORT_TCP)? pj_str("TCP"):
+ pj_str("TLS");
+ info->info = (t->type==PJSIP_TRANSPORT_TCP)? pj_str("TCP transport"):
+ pj_str("TLS transport");
info->flag = factory->flag;
info->addr_len = sizeof(factory->local_addr);
info->local_addr = factory->local_addr;
diff --git a/version.mak b/version.mak
index 792ed9a8..ad6a0a62 100644
--- a/version.mak
+++ b/version.mak
@@ -1,3 +1,4 @@
+# Don't change the "export PJ_VERSION_xxx" style, they are parsed by setup.py
export PJ_VERSION_MAJOR := 2
export PJ_VERSION_MINOR := 0
export PJ_VERSION_REV :=