- Added possibility to give transport protocol for account's AoR.

- Do not show account's port or transport protocol except in Account Activity.
This commit is contained in:
Juha Heinanen
2019-11-27 10:55:46 +02:00
parent 1953325087
commit d8b26f9b64
15 changed files with 106 additions and 15 deletions

View File

@ -586,6 +586,22 @@ Java_com_tutpro_baresip_AccountKt_account_1aor(JNIEnv *env, jobject thiz, jstrin
return (*env)->NewStringUTF(env, "");
}
JNIEXPORT jstring JNICALL
Java_com_tutpro_baresip_AccountKt_account_1uri(JNIEnv *env, jobject thiz, jstring javaAcc) {
const char *native_acc = (*env)->GetStringUTFChars(env, javaAcc, 0);
struct account *acc = (struct account *)strtoul(native_acc, NULL, 10);
(*env)->ReleaseStringUTFChars(env, javaAcc, native_acc);
const struct sip_addr *addr = account_laddr(acc);
char uri_buf[512];
int l;
l = re_snprintf(&(uri_buf[0]), 511, "%H", uri_encode, addr->uri);
if (l != -1)
uri_buf[l] = '\0';
else
uri_buf[0] = '\0';
return (*env)->NewStringUTF(env, uri_buf);
}
JNIEXPORT jstring JNICALL
Java_com_tutpro_baresip_AccountKt_account_1auth_1user(JNIEnv *env, jobject thiz, jstring javaAcc) {
const char *native_acc = (*env)->GetStringUTFChars(env, javaAcc, 0);