Commit 92285141 authored by Yann Diorcet's avatar Yann Diorcet
Browse files

Merge branch 'master' of git.linphone.org:linphone into belle-sip

parents ba1318d8 47a02f34
......@@ -473,6 +473,7 @@ LinphoneCall * linphone_call_new_outgoing(struct _LinphoneCore *lc, LinphoneAddr
linphone_call_init_common(call,from,to);
_linphone_call_params_copy(&call->params,params);
sal_op_set_custom_header(call->op,call->params.custom_headers);
call->params.custom_headers=NULL;
if (linphone_core_get_firewall_policy(call->core) == LinphonePolicyUseIce) {
call->ice_session = ice_session_new();
......@@ -550,14 +551,14 @@ LinphoneCall * linphone_call_new_incoming(LinphoneCore *lc, LinphoneAddress *fro
break;
case LinphonePolicyUseUpnp:
#ifdef BUILD_UPNP
call->upnp_session = linphone_upnp_session_new(call);
if (call->upnp_session != NULL) {
linphone_call_init_media_streams(call);
if (linphone_core_update_upnp_from_remote_media_description(call, sal_call_get_remote_media_description(op))<0) {
/* uPnP port mappings failed, proceed with the call anyway. */
linphone_call_delete_upnp_session(call);
call->upnp_session = linphone_upnp_session_new(call);
if (call->upnp_session != NULL) {
linphone_call_init_media_streams(call);
if (linphone_core_update_upnp_from_remote_media_description(call, sal_call_get_remote_media_description(op))<0) {
/* uPnP port mappings failed, proceed with the call anyway. */
linphone_call_delete_upnp_session(call);
}
}
}
#endif //BUILD_UPNP
break;
default:
......
......@@ -270,6 +270,10 @@ const rtp_stats_t *linphone_call_log_get_remote_stats(const LinphoneCallLog *cl)
return &cl->remote_stats;
}
const char *linphone_call_log_get_call_id(const LinphoneCallLog *cl){
return cl->call_id;
}
/**
* Assign a user pointer to the call log.
**/
......@@ -326,6 +330,13 @@ LinphoneAddress *linphone_call_log_get_to(LinphoneCallLog *cl){
return cl->to;
}
/**
* Returns remote address (that is from or to depending on call direction).
**/
LinphoneAddress *linphone_call_log_get_remote_address(LinphoneCallLog *cl){
return (cl->dir == LinphoneCallIncoming) ? cl->from : cl->to;
}
/**
* Returns the direction of the call.
**/
......@@ -2089,7 +2100,7 @@ void linphone_core_iterate(LinphoneCore *lc){
linphone_core_start_invite() */
calls=calls->next;
linphone_call_background_tasks(call,one_second_elapsed);
if (call->state==LinphoneCallOutgoingInit && (curtime-call->start_time>=2)){
if (call->state==LinphoneCallOutgoingInit && (elapsed>=4)){
/*start the call even if the OPTIONS reply did not arrive*/
if (call->ice_session != NULL) {
ms_warning("ICE candidates gathering from [%s] has not finished yet, proceed with the call without ICE anyway."
......@@ -2372,6 +2383,8 @@ int linphone_core_proceed_with_invite_if_ready(LinphoneCore *lc, LinphoneCall *c
} else {
upnp_ready = TRUE;
}
#else
upnp_ready=TRUE;
#endif //BUILD_UPNP
if (call->ping_op != NULL) {
if (call->ping_replied == TRUE) ping_ready = TRUE;
......
......@@ -160,6 +160,7 @@ typedef enum LinphoneMediaEncryption LinphoneMediaEncryption;
/*public: */
LinphoneAddress *linphone_call_log_get_from(LinphoneCallLog *cl);
LinphoneAddress *linphone_call_log_get_to(LinphoneCallLog *cl);
LinphoneAddress *linphone_call_log_get_remote_address(LinphoneCallLog *cl);
LinphoneCallDir linphone_call_log_get_dir(LinphoneCallLog *cl);
LinphoneCallStatus linphone_call_log_get_status(LinphoneCallLog *cl);
time_t linphone_call_log_get_start_date(LinphoneCallLog *cl);
......@@ -171,6 +172,7 @@ void linphone_call_log_set_ref_key(LinphoneCallLog *cl, const char *refkey);
const char *linphone_call_log_get_ref_key(const LinphoneCallLog *cl);
const rtp_stats_t *linphone_call_log_get_local_stats(const LinphoneCallLog *cl);
const rtp_stats_t *linphone_call_log_get_remote_stats(const LinphoneCallLog *cl);
const char *linphone_call_log_get_call_id(const LinphoneCallLog *cl);
char * linphone_call_log_to_str(LinphoneCallLog *cl);
struct _LinphoneCallParams;
......
......@@ -1694,7 +1694,7 @@ extern "C" void Java_org_linphone_core_LinphoneChatMessageImpl_addCustomHeader(J
const char *value=env->GetStringUTFChars(jheader_value,NULL);
linphone_chat_message_add_custom_header((LinphoneChatMessage*)ptr,name,value);
env->ReleaseStringUTFChars(jheader_name, name);
env->ReleaseStringUTFChars(jheader_name, name);
env->ReleaseStringUTFChars(jheader_value, value);
}
extern "C" jstring Java_org_linphone_core_LinphoneChatMessageImpl_getExternalBodyUrl(JNIEnv* env
......@@ -1876,7 +1876,7 @@ extern "C" jstring Java_org_linphone_core_LinphoneCallParamsImpl_getCustomHeader
return header_value ? env->NewStringUTF(header_value) : NULL;
}
extern "C" void Java_org_linphone_core_LinphoneCallParamsImpl_setCustomHeader(JNIEnv *env, jobject thiz, jlong lcp, jstring jheader_name, jstring jheader_value){
extern "C" void Java_org_linphone_core_LinphoneCallParamsImpl_addCustomHeader(JNIEnv *env, jobject thiz, jlong lcp, jstring jheader_name, jstring jheader_value){
const char* header_name=env->GetStringUTFChars(jheader_name, NULL);
const char* header_value=env->GetStringUTFChars(jheader_value, NULL);
linphone_call_params_add_custom_header((LinphoneCallParams*)lcp,header_name,header_value);
......
......@@ -68,7 +68,7 @@ void linphone_gtk_call_log_update(GtkWidget *w){
g_date_time_unref(dt);
}
#else
start_date=g_strdup(ctime(start_date_time));
start_date=g_strdup(ctime(&start_date_time));
#endif
display=linphone_address_get_display_name (la);
......
mediastreamer2 @ 63aef125
Subproject commit 6251dea54272cf048c580e03a80c67d672367f2a
Subproject commit 63aef125c633be420f4a162b2e7526339674f4a2
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment