diff --git a/.gitignore b/.gitignore index 2bbd7b4c4..0a2707182 100644 --- a/.gitignore +++ b/.gitignore @@ -81,3 +81,4 @@ tester/linphone_log.txt .tx/linphone-gtk.linphonedesktopin/ po/linphone.pot .tx/linphone-gtk.audio-assistantdesktopin/ +tester/linphone_log.gz.txt diff --git a/build/android/Android.mk b/build/android/Android.mk index 9690877ee..9cf269871 100755 --- a/build/android/Android.mk +++ b/build/android/Android.mk @@ -218,16 +218,18 @@ LOCAL_CFLAGS += -DBUILD_UPNP LOCAL_SRC_FILES += upnp.c endif -LOCAL_STATIC_LIBRARIES += libspeex +LOCAL_STATIC_LIBRARIES += libspeex ifeq ($(BUILD_SRTP), 1) LOCAL_C_INCLUDES += $(SRTP_C_INCLUDE) endif +ifeq ($(BUILD_ILBC), 1) ifneq ($(TARGET_ARCH_ABI),armeabi) LOCAL_CFLAGS += -DHAVE_ILBC=1 LOCAL_STATIC_LIBRARIES += libmsilbc endif +endif LOCAL_C_INCLUDES += $(LIBLINPHONE_EXTENDED_C_INCLUDES) LOCAL_WHOLE_STATIC_LIBRARIES += $(LIBLINPHONE_EXTENDED_STATIC_LIBS) @@ -253,8 +255,8 @@ endif ifeq ($(BUILD_OPUS),1) LOCAL_STATIC_LIBRARIES += libopus endif -LOCAL_EXPORT_C_INCLUDES := $(LOCAL_C_INCLUDES) -LOCAL_EXPORT_CFLAGS := $(LOCAL_CFLAGS) +LOCAL_EXPORT_C_INCLUDES := $(LOCAL_C_INCLUDES) +LOCAL_EXPORT_CFLAGS := $(LOCAL_CFLAGS) ifeq ($(_BUILD_VIDEO),1) LOCAL_SHARED_LIBRARIES += \ diff --git a/build/wp8/LibLinphoneTester-native/linphone-tester-native.h b/build/wp8/LibLinphoneTester-native/linphone-tester-native.h index b46b57af0..1839cc481 100644 --- a/build/wp8/LibLinphoneTester-native/linphone-tester-native.h +++ b/build/wp8/LibLinphoneTester-native/linphone-tester-native.h @@ -30,4 +30,4 @@ namespace linphone_tester_native Platform::String^ testName(Platform::String^ suiteName, int testIndex); void run(Platform::String^ suiteName, Platform::String^ caseName, Platform::Boolean verbose); }; -} \ No newline at end of file +} diff --git a/configure.ac b/configure.ac index adeed8e58..40d93a208 100644 --- a/configure.ac +++ b/configure.ac @@ -62,7 +62,7 @@ case $target in *mingw*) CFLAGS="$CFLAGS -DORTP_STATIC -D_WIN32_WINNT=0x0501 " CXXFLAGS="$CXXFLAGS -DORTP_STATIC -D_WIN32_WINNT=0x0501" - LIBS="$LIBS -lws2_32" + LIBS="$LIBS -L/lib -lws2_32" GUI_FLAGS="-mwindows" CONSOLE_FLAGS="-mconsole" mingw_found=yes @@ -272,28 +272,39 @@ if test "$build_upnp" != "false" ; then fi dnl check zlib -PKG_CHECK_MODULES(ZLIB, [zlib], [found_zlib=yes], [found_zlib=no]) -if test "x$found_zlib" = "xno" ; then - AC_CHECK_LIB(z, inflate, - [AC_CHECK_HEADER([zlib.h], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([[ - #include - #if !defined(ZLIB_VERNUM) || (ZLIB_VERNUM < 0x1230) - // compile error - #endif - ]],[])], - [found_zlib=yes])])]) +AC_ARG_ENABLE(zlib, + [AS_HELP_STRING([--disable-zlib], [Disable ZLib support])], + [case "${enableval}" in + yes) build_zlib=true ;; + no) build_zlib=false ;; + *) AC_MSG_ERROR(bad value ${enableval} for --disable-zlib) ;; + esac], + [build_zlib=auto] +) +if test "$build_zlib" != "false" ; then + PKG_CHECK_MODULES(ZLIB, [zlib], [found_zlib=yes], [found_zlib=no]) if test "x$found_zlib" = "xno" ; then - AC_MSG_NOTICE([zlib library and headers not found]) + AC_CHECK_LIB(z, inflate, + [AC_CHECK_HEADER([zlib.h], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[ + #include + #if !defined(ZLIB_VERNUM) || (ZLIB_VERNUM < 0x1230) + // compile error + #endif + ]],[])], + [found_zlib=yes])])]) + if test "x$found_zlib" = "xno" ; then + AC_MSG_NOTICE([zlib library and headers not found]) + else + AC_DEFINE( HAVE_ZLIB, 1, [ZLIB support] ) + ZLIBS_LIBS='-z' + AC_SUBST(ZLIB_LIBS) + fi else + AC_MSG_NOTICE([ZLIB found]) AC_DEFINE( HAVE_ZLIB, 1, [ZLIB support] ) - ZLIBS_LIBS='-z' - AC_SUBST(ZLIB_LIBS) fi -else - AC_MSG_NOTICE([ZLIB found]) - AC_DEFINE( HAVE_ZLIB, 1, [ZLIB support] ) fi diff --git a/coreapi/CMakeLists.txt b/coreapi/CMakeLists.txt index 541e0d670..4c35d14a7 100644 --- a/coreapi/CMakeLists.txt +++ b/coreapi/CMakeLists.txt @@ -139,7 +139,7 @@ if(ENABLE_STATIC) target_link_libraries(linphone ${LIBS}) else() add_library(linphone SHARED ${SOURCE_FILES} ${GENERATED_SOURCE_FILES}) - set_target_properties(linphone PROPERTIES VERSION ${LINPHONE_VERSION} SOVERSION ${LINPHONE_SO_VERSION} LINKER_LANGUAGE CXX) + set_target_properties(linphone PROPERTIES VERSION ${LINPHONE_SO_VERSION} LINKER_LANGUAGE CXX) target_link_libraries(linphone ${LIBS}) if(MSVC) if(CMAKE_BUILD_TYPE STREQUAL "Debug") diff --git a/coreapi/Makefile.am b/coreapi/Makefile.am index 160d0a420..26fff6f6e 100644 --- a/coreapi/Makefile.am +++ b/coreapi/Makefile.am @@ -138,7 +138,9 @@ liblinphone_la_LIBADD= \ $(LIBSOUP_LIBS) \ $(SQLITE3_LIBS) \ $(LIBXML2_LIBS) \ - $(LDAP_LIBS) $(SASL_LIBS) + $(LDAP_LIBS) \ + $(SASL_LIBS) \ + $(ZLIB_LIBS) if ENABLE_TESTS @@ -175,7 +177,9 @@ COMMON_CFLAGS=\ $(TUNNEL_CFLAGS) \ $(SQLITE3_CFLAGS) \ $(LIBXML2_CFLAGS) \ - $(LDAP_CFLAGS) $(SASL_CFLAGS) + $(LDAP_CFLAGS) \ + $(SASL_CFLAGS) \ + $(ZLIB_CFLAGS) if BUILD_WIZARD COMMON_CFLAGS+= -DBUILD_WIZARD diff --git a/coreapi/chat.c b/coreapi/chat.c index 4bdf5e133..72660e011 100644 --- a/coreapi/chat.c +++ b/coreapi/chat.c @@ -484,7 +484,7 @@ LinphoneChatRoom * linphone_core_create_chat_room(LinphoneCore *lc, const char * * Get a chat room whose peer is the supplied address. If it does not exist yet, it will be created. * @param lc the linphone core * @param addr a linphone address. - * @returns #LinphoneChatRoom where messaging can take place. + * @return #LinphoneChatRoom where messaging can take place. **/ LinphoneChatRoom *linphone_core_get_chat_room(LinphoneCore *lc, const LinphoneAddress *addr){ LinphoneChatRoom *ret = _linphone_core_get_chat_room(lc, addr); @@ -498,7 +498,7 @@ LinphoneChatRoom *linphone_core_get_chat_room(LinphoneCore *lc, const LinphoneAd * Get a chat room for messaging from a sip uri like sip:joe@sip.linphone.org. If it does not exist yet, it will be created. * @param lc The linphone core * @param to The destination address for messages. - * @returns #LinphoneChatRoom where messaging can take place. + * @return #LinphoneChatRoom where messaging can take place. **/ LinphoneChatRoom * linphone_core_get_chat_room_from_uri(LinphoneCore *lc, const char *to) { return _linphone_core_get_or_create_chat_room(lc, to); @@ -1634,6 +1634,7 @@ LinphoneChatMessage* linphone_chat_room_create_file_transfer_message(LinphoneCha msg->callbacks=linphone_chat_message_cbs_new(); msg->chat_room=(LinphoneChatRoom*)cr; msg->message = NULL; + msg->is_read=TRUE; msg->file_transfer_information = linphone_content_copy(initial_content); msg->dir=LinphoneChatMessageOutgoing; linphone_chat_message_set_to(msg, linphone_chat_room_get_peer_address(cr)); diff --git a/coreapi/conference.c b/coreapi/conference.c index f860c33ad..75f451736 100644 --- a/coreapi/conference.c +++ b/coreapi/conference.c @@ -157,7 +157,7 @@ static void add_local_endpoint(LinphoneConference *conf,LinphoneCore *lc){ /** * Returns the sound volume (mic input) of the local participant of the conference. * @param lc the linphone core - * @returns the measured input volume expressed in dbm0. + * @return the measured input volume expressed in dbm0. **/ float linphone_core_get_conference_local_input_volume(LinphoneCore *lc){ LinphoneConference *conf=&lc->conf_ctx; @@ -180,7 +180,7 @@ float linphone_core_get_conference_local_input_volume(LinphoneCore *lc){ * If the local user was actively part of the call (ie not in paused state), then the local user is automatically entered into the conference. * If the call was in paused state, then it is automatically resumed when entering into the conference. * - * @returns 0 if successful, -1 otherwise. + * @return 0 if successful, -1 otherwise. **/ int linphone_core_add_to_conference(LinphoneCore *lc, LinphoneCall *call){ LinphoneConference *conf=&lc->conf_ctx; @@ -289,7 +289,7 @@ static int convert_conference_to_call(LinphoneCore *lc){ * In other words, unless linphone_core_leave_conference() is explicitely called, the last remote participant of a conference is automatically * put in a simple call in running state. * - * @returns 0 if successful, -1 otherwise. + * @return 0 if successful, -1 otherwise. **/ int linphone_core_remove_from_conference(LinphoneCore *lc, LinphoneCall *call){ int err; @@ -314,7 +314,7 @@ int linphone_core_remove_from_conference(LinphoneCore *lc, LinphoneCall *call){ /** * Indicates whether the local participant is part of the conference. * @param lc the linphone core - * @returns TRUE if the local participant is in the conference, FALSE otherwise. + * @return TRUE if the local participant is in the conference, FALSE otherwise. **/ bool_t linphone_core_is_in_conference(const LinphoneCore *lc){ return lc->conf_ctx.local_participant!=NULL; @@ -324,7 +324,7 @@ bool_t linphone_core_is_in_conference(const LinphoneCore *lc){ * Moves the local participant out of the conference. * @param lc the linphone core * When the local participant is out of the conference, the remote participants can continue to talk normally. - * @returns 0 if successful, -1 otherwise. + * @return 0 if successful, -1 otherwise. **/ int linphone_core_leave_conference(LinphoneCore *lc){ LinphoneConference *conf=&lc->conf_ctx; @@ -342,7 +342,7 @@ int linphone_core_leave_conference(LinphoneCore *lc){ * However, by calling linphone_core_leave_conference() and linphone_core_enter_conference() the application can decide to temporarily * move out and in the local participant from the conference. * - * @returns 0 if successful, -1 otherwise + * @return 0 if successful, -1 otherwise **/ int linphone_core_enter_conference(LinphoneCore *lc){ LinphoneConference *conf; @@ -363,7 +363,7 @@ int linphone_core_enter_conference(LinphoneCore *lc){ * * Merge all established calls (either in LinphoneCallStreamsRunning or LinphoneCallPaused) into a conference. * - * @returns 0 if successful, -1 otherwise + * @return 0 if successful, -1 otherwise **/ int linphone_core_add_all_to_conference(LinphoneCore *lc) { MSList *calls=lc->calls; @@ -384,7 +384,7 @@ int linphone_core_add_all_to_conference(LinphoneCore *lc) { * * All the calls that were merged to the conference are terminated, and the conference resources are destroyed. * - * @returns 0 if successful, -1 otherwise + * @return 0 if successful, -1 otherwise **/ int linphone_core_terminate_conference(LinphoneCore *lc) { MSList *calls=lc->calls; @@ -408,7 +408,7 @@ int linphone_core_terminate_conference(LinphoneCore *lc) { * Typically, after merging two calls into the conference, there is total of 3 participants: * the local participant (or local user), and two remote participants that were the destinations of the two previously establised calls. * - * @returns the number of participants to the conference + * @return the number of participants to the conference **/ int linphone_core_get_conference_size(LinphoneCore *lc) { LinphoneConference *conf=&lc->conf_ctx; diff --git a/coreapi/linphonecall.c b/coreapi/linphonecall.c index 25a258067..8923b804a 100644 --- a/coreapi/linphonecall.c +++ b/coreapi/linphonecall.c @@ -2678,7 +2678,7 @@ float linphone_call_get_record_volume(LinphoneCall *call){ * 1-2 = very poor quality
* 0-1 = can't be worse, mostly unusable
* - * @returns The function returns -1 if no quality measurement is available, for example if no + * @return The function returns -1 if no quality measurement is available, for example if no * active audio stream exist. Otherwise it returns the quality rating. **/ float linphone_call_get_current_quality(LinphoneCall *call){ diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index c8ba1b332..678d0ca53 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -6003,7 +6003,7 @@ void linphone_core_set_rtp_transport_factories(LinphoneCore* lc, LinphoneRtpTran * * @note Remote RTP statistics is not implemented yet. * - * @returns 0 or -1 if no call is running. + * @return 0 or -1 if no call is running. **/ int linphone_core_get_current_call_stats(LinphoneCore *lc, rtp_stats_t *local, rtp_stats_t *remote){ diff --git a/coreapi/linphonecore.h b/coreapi/linphonecore.h index ee44009f0..3ec93dc5d 100644 --- a/coreapi/linphonecore.h +++ b/coreapi/linphonecore.h @@ -730,7 +730,7 @@ LINPHONE_PUBLIC bool_t linphone_call_media_in_progress(LinphoneCall *call); * The dtmf is automatically played to the user. * @param call The LinphoneCall object * @param dtmf The dtmf name specified as a char, such as '0', '#' etc... - * @returns 0 if successful, -1 on error. + * @return 0 if successful, -1 on error. **/ LINPHONE_PUBLIC int linphone_call_send_dtmf(LinphoneCall *lc,char dtmf); @@ -741,7 +741,7 @@ LINPHONE_PUBLIC int linphone_call_send_dtmf(LinphoneCall *lc,char dtmf); * Sending is canceled if the call state changes to something not LinphoneCallStreamsRunning. * @param call The LinphoneCall object * @param dtmfs A dtmf sequence such as '123#123123' - * @returns -2 if there is already a DTMF sequence, -1 if call is not ready, 0 otherwise. + * @return -2 if there is already a DTMF sequence, -1 if call is not ready, 0 otherwise. **/ LINPHONE_PUBLIC int linphone_call_send_dtmfs(LinphoneCall *call,char *dtmfs); @@ -963,7 +963,7 @@ LINPHONE_PUBLIC int linphone_proxy_config_get_quality_reporting_interval(Linphon /** * Get the registration state of the given proxy config. * @param[in] obj #LinphoneProxyConfig object. - * @returns The registration state of the proxy config. + * @return The registration state of the proxy config. **/ LINPHONE_PUBLIC LinphoneRegistrationState linphone_proxy_config_get_state(const LinphoneProxyConfig *obj); @@ -972,21 +972,21 @@ LINPHONE_PUBLIC bool_t linphone_proxy_config_is_registered(const LinphoneProxyCo /** * Get the domain name of the given proxy config. * @param[in] cfg #LinphoneProxyConfig object. - * @returns The domain name of the proxy config. + * @return The domain name of the proxy config. **/ LINPHONE_PUBLIC const char *linphone_proxy_config_get_domain(const LinphoneProxyConfig *cfg); /** * Get the realm of the given proxy config. * @param[in] cfg #LinphoneProxyConfig object. - * @returns The realm of the proxy config. + * @return The realm of the proxy config. **/ LINPHONE_PUBLIC const char *linphone_proxy_config_get_realm(const LinphoneProxyConfig *cfg); /** * Set the realm of the given proxy config. * @param[in] cfg #LinphoneProxyConfig object. * @param[in] realm New realm value. - * @returns The realm of the proxy config. + * @return The realm of the proxy config. **/ LINPHONE_PUBLIC void linphone_proxy_config_set_realm(LinphoneProxyConfig *cfg, const char * realm); @@ -1007,7 +1007,7 @@ LINPHONE_PUBLIC const char* linphone_proxy_config_get_contact_uri_parameters(con /** * Get the #LinphoneCore object to which is associated the #LinphoneProxyConfig. * @param[in] obj #LinphoneProxyConfig object. - * @returns The #LinphoneCore object to which is associated the #LinphoneProxyConfig. + * @return The #LinphoneCore object to which is associated the #LinphoneProxyConfig. **/ LINPHONE_PUBLIC LinphoneCore * linphone_proxy_config_get_core(const LinphoneProxyConfig *obj); @@ -1017,22 +1017,22 @@ LINPHONE_PUBLIC const char * linphone_proxy_config_get_dial_prefix(const Linphon /** * Get the reason why registration failed when the proxy config state is LinphoneRegistrationFailed. * @param[in] cfg #LinphoneProxyConfig object. - * @returns The reason why registration failed for this proxy config. + * @return The reason why registration failed for this proxy config. **/ LINPHONE_PUBLIC LinphoneReason linphone_proxy_config_get_error(const LinphoneProxyConfig *cfg); /** * Get detailed information why registration failed when the proxy config state is LinphoneRegistrationFailed. * @param[in] cfg #LinphoneProxyConfig object. - * @returns The details why registration failed for this proxy config. + * @return The details why registration failed for this proxy config. **/ LINPHONE_PUBLIC const LinphoneErrorInfo *linphone_proxy_config_get_error_info(const LinphoneProxyConfig *cfg); -/* - * return the transport from either : service route, route, or addr - * @returns cfg object - * @return transport as string (I.E udp, tcp, tls, dtls)*/ - +/** + * Get the transport from either service route, route or addr. + * @param[in] cfg #LinphoneProxyConfig object. + * @return The transport as a string (I.E udp, tcp, tls, dtls) +**/ LINPHONE_PUBLIC const char* linphone_proxy_config_get_transport(const LinphoneProxyConfig *cfg); @@ -1041,10 +1041,27 @@ LINPHONE_PUBLIC void linphone_proxy_config_destroy(LinphoneProxyConfig *cfg); LINPHONE_PUBLIC void linphone_proxy_config_set_sip_setup(LinphoneProxyConfig *cfg, const char *type); SipSetupContext *linphone_proxy_config_get_sip_setup_context(LinphoneProxyConfig *cfg); LINPHONE_PUBLIC SipSetup *linphone_proxy_config_get_sip_setup(LinphoneProxyConfig *cfg); + /** - * normalize a human readable phone number into a basic string. 888-444-222 becomes 888444222 + * Detect if the given input is a phone number or not. + * @param proxy #LinphoneProxyConfig argument, unused yet but may contain useful data. Can be NULL. + * @param username string to parse. + * @return TRUE if input is a phone number, FALSE otherwise. +**/ +LINPHONE_PUBLIC bool_t linphone_proxy_config_is_phone_number(LinphoneProxyConfig *proxy, const char *username); + +/** + * Normalize a human readable phone number into a basic string. 888-444-222 becomes 888444222 + * or +33888444222 depending on the #LinphoneProxyConfig argument. This function will always + * generate a normalized username; if input is not a phone number, output will be a copy of input. + * @param proxy #LinphoneProxyConfig object containing country code and/or escape symbol. + * @param username the string to parse + * @param result the newly normalized number + * @param result_len the size of the normalized number \a result + * @return TRUE if a phone number was recognized, FALSE otherwise. */ -LINPHONE_PUBLIC int linphone_proxy_config_normalize_number(LinphoneProxyConfig *proxy, const char *username, char *result, size_t result_len); +LINPHONE_PUBLIC bool_t linphone_proxy_config_normalize_number(LinphoneProxyConfig *proxy, const char *username, + char *result, size_t result_len); /** * Set default privacy policy for all calls routed through this proxy. @@ -1440,7 +1457,7 @@ LINPHONE_PUBLIC void linphone_chat_room_mark_as_read(LinphoneChatRoom *cr); /** * Delete a message from the chat room history. * @param[in] cr The #LinphoneChatRoom object corresponding to the conversation. - * @param[in] msg The #LinphoneChatMessage object to remove. + * @param[in] msg The #LinphoneChatMessage object to remove. */ LINPHONE_PUBLIC void linphone_chat_room_delete_message(LinphoneChatRoom *cr, LinphoneChatMessage *msg); @@ -1840,7 +1857,7 @@ typedef struct _LinphoneCoreVTable{ /** * Instantiate a vtable with all arguments set to NULL - * @returns newly allocated vtable + * @return newly allocated vtable */ LINPHONE_PUBLIC LinphoneCoreVTable *linphone_core_v_table_new(); @@ -1854,7 +1871,7 @@ LINPHONE_PUBLIC void linphone_core_v_table_set_user_data(LinphoneCoreVTable *tab /** * Gets a user data pointer in the vtable. * @param table the vtable - * @returns the data attached to the vtable + * @return the data attached to the vtable */ LINPHONE_PUBLIC void* linphone_core_v_table_get_user_data(LinphoneCoreVTable *table); @@ -1862,7 +1879,7 @@ LINPHONE_PUBLIC void* linphone_core_v_table_get_user_data(LinphoneCoreVTable *ta * Gets the current VTable. * This is meant only to be called from a callback to be able to get the user_data associated with the vtable that called the callback. * @param lc the linphonecore - * @returns the vtable that called the last callback + * @return the vtable that called the last callback */ LINPHONE_PUBLIC LinphoneCoreVTable *linphone_core_get_current_vtable(LinphoneCore *lc); @@ -1914,7 +1931,7 @@ typedef enum _LinphoneLogCollectionState { /** * Tells whether the linphone core log collection is enabled. * @ingroup misc - * @returns The state of the linphone core log collection. + * @return The state of the linphone core log collection. */ LINPHONE_PUBLIC LinphoneLogCollectionState linphone_core_log_collection_enabled(void); @@ -1928,7 +1945,7 @@ LINPHONE_PUBLIC void linphone_core_enable_log_collection(LinphoneLogCollectionSt /** * Get the path where the log files will be written for log collection. * @ingroup misc - * @returns The path where the log files will be written. + * @return The path where the log files will be written. */ LINPHONE_PUBLIC const char * linphone_core_get_log_collection_path(void); @@ -1942,7 +1959,7 @@ LINPHONE_PUBLIC void linphone_core_set_log_collection_path(const char *path); /** * Get the prefix of the filenames that will be used for log collection. * @ingroup misc - * @returns The prefix of the filenames used for log collection. + * @return The prefix of the filenames used for log collection. */ LINPHONE_PUBLIC const char * linphone_core_get_log_collection_prefix(void); @@ -1956,7 +1973,7 @@ LINPHONE_PUBLIC void linphone_core_set_log_collection_prefix(const char *prefix) /** * Get the max file size in bytes of the files used for log collection. * @ingroup misc - * @returns The max file size in bytes of the files used for log collection. + * @return The max file size in bytes of the files used for log collection. */ LINPHONE_PUBLIC int linphone_core_get_log_collection_max_file_size(void); @@ -2140,7 +2157,7 @@ LINPHONE_PUBLIC int linphone_core_terminate_call(LinphoneCore *lc, LinphoneCall * @param[in] lc #LinphoneCore object. * @param[in] call The #LinphoneCall to redirect. * @param[in] redirect_uri The URI to redirect the call to. - * @returns 0 if successful, -1 on error. + * @return 0 if successful, -1 on error. * @ingroup call_control */ LINPHONE_PUBLIC int linphone_core_redirect_call(LinphoneCore *lc, LinphoneCall *call, const char *redirect_uri); @@ -2246,7 +2263,7 @@ LINPHONE_PUBLIC void linphone_core_enable_dns_srv(LinphoneCore *lc, bool_t enabl /** * Tells whether DNS SRV resolution is enabled. * @param[in] lc #LinphoneCore object. - * @returns TRUE if DNS SRV resolution is enabled, FALSE if disabled. + * @return TRUE if DNS SRV resolution is enabled, FALSE if disabled. * @ingroup media_parameters */ LINPHONE_PUBLIC bool_t linphone_core_dns_srv_enabled(const LinphoneCore *lc); @@ -2264,7 +2281,7 @@ LINPHONE_PUBLIC int linphone_core_set_video_codecs(LinphoneCore *lc, MSList *cod * Tells whether the specified payload type is enabled. * @param[in] lc #LinphoneCore object. * @param[in] pt The #LinphonePayloadType we want to know is enabled or not. - * @returns TRUE if the payload type is enabled, FALSE if disabled. + * @return TRUE if the payload type is enabled, FALSE if disabled. * @ingroup media_parameters */ LINPHONE_PUBLIC bool_t linphone_core_payload_type_enabled(LinphoneCore *lc, const LinphonePayloadType *pt); @@ -2273,7 +2290,7 @@ LINPHONE_PUBLIC bool_t linphone_core_payload_type_enabled(LinphoneCore *lc, cons * Tells whether the specified payload type represents a variable bitrate codec. * @param[in] lc #LinphoneCore object. * @param[in] pt The #LinphonePayloadType we want to know - * @returns TRUE if the payload type represents a VBR codec, FALSE if disabled. + * @return TRUE if the payload type represents a VBR codec, FALSE if disabled. * @ingroup media_parameters */ LINPHONE_PUBLIC bool_t linphone_core_payload_type_is_vbr(LinphoneCore *lc, const LinphonePayloadType *pt); @@ -2398,7 +2415,7 @@ LINPHONE_PUBLIC void linphone_core_enable_audio_adaptive_jittcomp(LinphoneCore * /** * Tells whether the audio adaptive jitter compensation is enabled. * @param[in] lc #LinphoneCore object - * @returns TRUE if the audio adaptive jitter compensation is enabled, FALSE otherwise. + * @return TRUE if the audio adaptive jitter compensation is enabled, FALSE otherwise. * @ingroup media_parameters */ LINPHONE_PUBLIC bool_t linphone_core_audio_adaptive_jittcomp_enabled(LinphoneCore *lc); @@ -2418,7 +2435,7 @@ LINPHONE_PUBLIC void linphone_core_enable_video_adaptive_jittcomp(LinphoneCore * /** * Tells whether the video adaptive jitter compensation is enabled. * @param[in] lc #LinphoneCore object - * @returns TRUE if the video adaptive jitter compensation is enabled, FALSE otherwise. + * @return TRUE if the video adaptive jitter compensation is enabled, FALSE otherwise. * @ingroup media_parameters */ LINPHONE_PUBLIC bool_t linphone_core_video_adaptive_jittcomp_enabled(LinphoneCore *lc); @@ -2497,7 +2514,7 @@ LINPHONE_PUBLIC void linphone_core_set_stun_server(LinphoneCore *lc, const char /** * Get the STUN server address being used. * @param[in] lc #LinphoneCore object - * @returns The STUN server address being used. + * @return The STUN server address being used. * @ingroup network_parameters */ LINPHONE_PUBLIC const char * linphone_core_get_stun_server(const LinphoneCore *lc); @@ -2542,7 +2559,7 @@ LINPHONE_PUBLIC void linphone_core_set_nat_address(LinphoneCore *lc, const char /** * Get the public IP address of NAT being used. * @param[in] lc #LinphoneCore object. - * @returns The public IP address of NAT being used. + * @return The public IP address of NAT being used. * @ingroup network_parameters */ LINPHONE_PUBLIC const char *linphone_core_get_nat_address(const LinphoneCore *lc); @@ -2558,7 +2575,7 @@ LINPHONE_PUBLIC void linphone_core_set_firewall_policy(LinphoneCore *lc, Linphon /** * Get the policy that is used to pass through firewalls. * @param[in] lc #LinphoneCore object. - * @returns The #LinphoneFirewallPolicy that is being used. + * @return The #LinphoneFirewallPolicy that is being used. * @ingroup network_parameters */ LINPHONE_PUBLIC LinphoneFirewallPolicy linphone_core_get_firewall_policy(const LinphoneCore *lc); @@ -2628,7 +2645,7 @@ LINPHONE_PUBLIC void linphone_core_enable_echo_limiter(LinphoneCore *lc, bool_t /** * Tells whether echo limiter is enabled. * @param[in] lc #LinphoneCore object. - * @returns TRUE if the echo limiter is enabled, FALSE otherwise. + * @return TRUE if the echo limiter is enabled, FALSE otherwise. * @ingroup media_parameters **/ LINPHONE_PUBLIC bool_t linphone_core_echo_limiter_enabled(const LinphoneCore *lc); @@ -2658,7 +2675,7 @@ LINPHONE_PUBLIC void linphone_core_enable_mic(LinphoneCore *lc, bool_t enable); /** * Tells whether the microphone is enabled. * @param[in] lc #LinphoneCore object - * @returns TRUE if the microphone is enabled, FALSE if disabled. + * @return TRUE if the microphone is enabled, FALSE if disabled. * @ingroup media_parameters **/ LINPHONE_PUBLIC bool_t linphone_core_mic_enabled(LinphoneCore *lc); @@ -2695,7 +2712,7 @@ LINPHONE_PUBLIC void linphone_core_clear_call_logs(LinphoneCore *lc); * Get the number of missed calls. * Once checked, this counter can be reset with linphone_core_reset_missed_calls_count(). * @param[in] lc #LinphoneCore object. - * @returns The number of missed calls. + * @return The number of missed calls. **/ LINPHONE_PUBLIC int linphone_core_get_missed_calls_count(LinphoneCore *lc); @@ -2786,7 +2803,7 @@ LINPHONE_PUBLIC void linphone_core_enable_video_source_reuse(LinphoneCore* lc, b /** * Tells whether video capture is enabled. * @param[in] lc #LinphoneCore object. - * @returns TRUE if video capture is enabled, FALSE if disabled. + * @return TRUE if video capture is enabled, FALSE if disabled. * @ingroup media_parameters **/ LINPHONE_PUBLIC bool_t linphone_core_video_capture_enabled(LinphoneCore *lc); @@ -2794,7 +2811,7 @@ LINPHONE_PUBLIC bool_t linphone_core_video_capture_enabled(LinphoneCore *lc); /** * Tells whether video display is enabled. * @param[in] lc #LinphoneCore object. - * @returns TRUE if video display is enabled, FALSE if disabled. + * @return TRUE if video display is enabled, FALSE if disabled. * @ingroup media_parameters **/ LINPHONE_PUBLIC bool_t linphone_core_video_display_enabled(LinphoneCore *lc); @@ -2818,7 +2835,7 @@ LINPHONE_PUBLIC MSVideoSize linphone_core_get_preferred_video_size(const Linphon /** * Get the name of the current preferred video size for sending. * @param[in] lc #LinphoneCore object. - * @returns A string containing the name of the current preferred video size (to be freed with ms_free()). + * @return A string containing the name of the current preferred video size (to be freed with ms_free()). */ LINPHONE_PUBLIC char * linphone_core_get_preferred_video_size_name(const LinphoneCore *lc); LINPHONE_PUBLIC void linphone_core_set_preferred_video_size_by_name(LinphoneCore *lc, const char *name); @@ -2858,7 +2875,7 @@ LINPHONE_PUBLIC int linphone_core_set_static_picture(LinphoneCore *lc, const cha /** * Get the path to the image file streamed when "Static picture" is set as the video device. * @param[in] lc #LinphoneCore object. - * @returns The path to the image file streamed when "Static picture" is set as the video device. + * @return The path to the image file streamed when "Static picture" is set as the video device. * @ingroup media_parameters */ LINPHONE_PUBLIC const char *linphone_core_get_static_picture(LinphoneCore *lc); @@ -3015,7 +3032,7 @@ LINPHONE_PUBLIC void linphone_core_set_zrtp_secrets_file(LinphoneCore *lc, const /** * Get the path to the file storing the zrtp secrets cache. * @param[in] lc #LinphoneCore object. - * @returns The path to the file storing the zrtp secrets cache. + * @return The path to the file storing the zrtp secrets cache. * @ingroup initializing */ LINPHONE_PUBLIC const char *linphone_core_get_zrtp_secrets_file(LinphoneCore *lc); @@ -3080,7 +3097,7 @@ LINPHONE_PUBLIC bool_t linphone_core_media_encryption_supported(const LinphoneCo * Choose the media encryption policy to be used for RTP packets. * @param[in] lc #LinphoneCore object. * @param[in] menc The media encryption policy to be used. - * @returns 0 if successful, any other value otherwise. + * @return 0 if successful, any other value otherwise. * @ingroup media_parameters */ LINPHONE_PUBLIC int linphone_core_set_media_encryption(LinphoneCore *lc, LinphoneMediaEncryption menc); @@ -3088,7 +3105,7 @@ LINPHONE_PUBLIC int linphone_core_set_media_encryption(LinphoneCore *lc, Linphon /** * Get the media encryption policy being used for RTP packets. * @param[in] lc #LinphoneCore object. - * @returns The media encryption policy being used. + * @return The media encryption policy being used. * @ingroup media_parameters */ LINPHONE_PUBLIC LinphoneMediaEncryption linphone_core_get_media_encryption(LinphoneCore *lc); @@ -3096,7 +3113,7 @@ LINPHONE_PUBLIC LinphoneMediaEncryption linphone_core_get_media_encryption(Linph /** * Get behaviour when encryption parameters negociation fails on outgoing call. * @param[in] lc #LinphoneCore object. - * @returns TRUE means the call will fail; FALSE means an INVITE will be resent with encryption disabled. + * @return TRUE means the call will fail; FALSE means an INVITE will be resent with encryption disabled. * @ingroup media_parameters */ LINPHONE_PUBLIC bool_t linphone_core_is_media_encryption_mandatory(LinphoneCore *lc); diff --git a/coreapi/linphonefriend.h b/coreapi/linphonefriend.h index f64286c0e..d0c18825d 100644 --- a/coreapi/linphonefriend.h +++ b/coreapi/linphonefriend.h @@ -261,14 +261,14 @@ LINPHONE_PUBLIC void linphone_friend_set_ref_key(LinphoneFriend *lf, const char /** * Get the reference key of a friend. * @param[in] lf #LinphoneFriend object. - * @returns The reference key of the friend. + * @return The reference key of the friend. **/ LINPHONE_PUBLIC const char *linphone_friend_get_ref_key(const LinphoneFriend *lf); /** * Check that the given friend is in a friend list. * @param[in] lf #LinphoneFriend object. - * @returns TRUE if the friend is in a friend list, FALSE otherwise. + * @return TRUE if the friend is in a friend list, FALSE otherwise. **/ LINPHONE_PUBLIC bool_t linphone_friend_in_list(const LinphoneFriend *lf); @@ -372,7 +372,7 @@ LINPHONE_PUBLIC void linphone_core_notify_all_friends(LinphoneCore *lc, Linphone * Search a LinphoneFriend by its address. * @param[in] lc #LinphoneCore object. * @param[in] addr The address to use to search the friend. - * @returns The #LinphoneFriend object corresponding to the given address. + * @return The #LinphoneFriend object corresponding to the given address. * @deprecated use linphone_core_find_friend() instead. */ LINPHONE_PUBLIC LinphoneFriend *linphone_core_get_friend_by_address(const LinphoneCore *lc, const char *addr); @@ -381,7 +381,7 @@ LINPHONE_PUBLIC LinphoneFriend *linphone_core_get_friend_by_address(const Linpho * Search a LinphoneFriend by its address. * @param[in] lc #LinphoneCore object. * @param[in] addr The address to use to search the friend. - * @returns The #LinphoneFriend object corresponding to the given address. + * @return The #LinphoneFriend object corresponding to the given address. */ LINPHONE_PUBLIC LinphoneFriend *linphone_core_find_friend(const LinphoneCore *lc, const LinphoneAddress *addr); @@ -389,7 +389,7 @@ LINPHONE_PUBLIC LinphoneFriend *linphone_core_find_friend(const LinphoneCore *lc * Search a LinphoneFriend by its reference key. * @param[in] lc #LinphoneCore object. * @param[in] key The reference key to use to search the friend. - * @returns The #LinphoneFriend object corresponding to the given reference key. + * @return The #LinphoneFriend object corresponding to the given reference key. */ LINPHONE_PUBLIC LinphoneFriend *linphone_core_get_friend_by_ref_key(const LinphoneCore *lc, const char *key); diff --git a/coreapi/linphonepresence.h b/coreapi/linphonepresence.h index 014821328..c0168cb8b 100644 --- a/coreapi/linphonepresence.h +++ b/coreapi/linphonepresence.h @@ -200,7 +200,7 @@ typedef struct _LinphonePresenceNote LinphonePresenceNote; * Creates a presence model specifying an activity. * @param[in] activity The activity to set for the created presence model. * @param[in] description An additional description of the activity (mainly useful for the 'other' activity). Set it to NULL to not add a description. - * @returns The created presence model, or NULL if an error occured. + * @return The created presence model, or NULL if an error occured. * @see linphone_presence_model_new * @see linphone_presence_model_new_with_activity_and_note * @@ -214,7 +214,7 @@ LINPHONE_PUBLIC LinphonePresenceModel * linphone_presence_model_new_with_activit * @param[in] description An additional description of the activity (mainly useful for the 'other' activity). Set it to NULL to not add a description. * @param[in] note An additional note giving additional information about the contact presence. * @param[in] lang The language the note is written in. It can be set to NULL in order to not specify the language of the note. - * @returns The created presence model, or NULL if an error occured. + * @return The created presence model, or NULL if an error occured. * @see linphone_presence_model_new_with_activity * @see linphone_presence_model_new_with_activity_and_note * @@ -344,7 +344,7 @@ LINPHONE_PUBLIC int linphone_presence_model_clear_notes(LinphonePresenceModel *m /** * Creates a default presence model. - * @returns The created presence model, NULL on error. + * @return The created presence model, NULL on error. * @see linphone_presence_model_new_with_activity * @see linphone_presence_model_new_with_activity_and_note * @@ -422,7 +422,7 @@ LINPHONE_PUBLIC int linphone_presence_model_clear_persons(LinphonePresenceModel * @param[in] id The id of the presence service to be created. Can be NULL to generate it automatically. * @param[in] basic_status The #LinphonePresenceBasicStatus to set for the #LinphonePresenceService object. * @param[in] contact The contact string to set. - * @returns The created presence service, NULL on error. + * @return The created presence service, NULL on error. * * The created presence service has the basic status 'closed'. */ @@ -515,7 +515,7 @@ LINPHONE_PUBLIC int linphone_presence_service_clear_notes(LinphonePresenceServic /** * Creates a presence person. * @param[in] id The id of the presence person to be created. Can be NULL to generate it automatically. - * @returns The created presence person, NULL on error. + * @return The created presence person, NULL on error. */ LINPHONE_PUBLIC LinphonePresencePerson * linphone_presence_person_new(const char *id); @@ -635,7 +635,7 @@ LINPHONE_PUBLIC int linphone_presence_person_clear_activities_notes(LinphonePres * Creates a presence activity. * @param[in] acttype The #LinphonePresenceActivityType to set for the activity. * @param[in] description An additional description of the activity to set for the activity. Can be NULL if no additional description is to be added. - * @returns The created presence activity, NULL on error. + * @return The created presence activity, NULL on error. */ LINPHONE_PUBLIC LinphonePresenceActivity * linphone_presence_activity_new(LinphonePresenceActivityType acttype, const char *description); @@ -687,7 +687,7 @@ LINPHONE_PUBLIC int linphone_presence_activity_set_description(LinphonePresenceA * Creates a presence note. * @param[in] content The content of the note to be created. * @param[in] lang The language of the note to be created. Can be NULL if no language is to be specified for the note. - * @returns The created presence note, NULL on error. + * @return The created presence note, NULL on error. */ LINPHONE_PUBLIC LinphonePresenceNote * linphone_presence_note_new(const char *content, const char *lang); @@ -876,14 +876,14 @@ LINPHONE_PUBLIC void * linphone_presence_note_get_user_data(const LinphonePresen * @param[in] lc #LinphoneCore object. * @param[in] acttype The #LinphonePresenceActivityType to set for the activity. * @param[in] description An additional description of the activity to set for the activity. Can be NULL if no additional description is to be added. - * @returns The created #LinphonePresenceActivity object. + * @return The created #LinphonePresenceActivity object. */ LINPHONE_PUBLIC LinphonePresenceActivity * linphone_core_create_presence_activity(LinphoneCore *lc, LinphonePresenceActivityType acttype, const char *description); /** * Create a default LinphonePresenceModel. * @param[in] lc #LinphoneCore object. - * @returns The created #LinphonePresenceModel object. + * @return The created #LinphonePresenceModel object. */ LINPHONE_PUBLIC LinphonePresenceModel * linphone_core_create_presence_model(LinphoneCore *lc); @@ -892,7 +892,7 @@ LINPHONE_PUBLIC LinphonePresenceModel * linphone_core_create_presence_model(Linp * @param[in] lc #LinphoneCore object. * @param[in] acttype The #LinphonePresenceActivityType to set for the activity of the created model. * @param[in] description An additional description of the activity to set for the activity. Can be NULL if no additional description is to be added. - * @returns The created #LinphonePresenceModel object. + * @return The created #LinphonePresenceModel object. */ LINPHONE_PUBLIC LinphonePresenceModel * linphone_core_create_presence_model_with_activity(LinphoneCore *lc, LinphonePresenceActivityType acttype, const char *description); @@ -903,7 +903,7 @@ LINPHONE_PUBLIC LinphonePresenceModel * linphone_core_create_presence_model_with * @param[in] description An additional description of the activity to set for the activity. Can be NULL if no additional description is to be added. * @param[in] note The content of the note to be added to the created model. * @param[in] lang The language of the note to be added to the created model. - * @returns The created #LinphonePresenceModel object. + * @return The created #LinphonePresenceModel object. */ LINPHONE_PUBLIC LinphonePresenceModel * linphone_core_create_presence_model_with_activity_and_note(LinphoneCore *lc, LinphonePresenceActivityType acttype, const char *description, const char *note, const char *lang); @@ -912,7 +912,7 @@ LINPHONE_PUBLIC LinphonePresenceModel * linphone_core_create_presence_model_with * @param[in] lc #LinphoneCore object. * @param[in] content The content of the note to be created. * @param[in] lang The language of the note to be created. - * @returns The created #LinphonePresenceNote object. + * @return The created #LinphonePresenceNote object. */ LINPHONE_PUBLIC LinphonePresenceNote * linphone_core_create_presence_note(LinphoneCore *lc, const char *content, const char *lang); @@ -920,7 +920,7 @@ LINPHONE_PUBLIC LinphonePresenceNote * linphone_core_create_presence_note(Linpho * Create a LinphonePresencePerson with the given id. * @param[in] lc #LinphoneCore object * @param[in] id The id of the person to be created. - * @returns The created #LinphonePresencePerson object. + * @return The created #LinphonePresencePerson object. */ LINPHONE_PUBLIC LinphonePresencePerson * linphone_core_create_presence_person(LinphoneCore *lc, const char *id); @@ -930,7 +930,7 @@ LINPHONE_PUBLIC LinphonePresencePerson * linphone_core_create_presence_person(Li * @param[in] id The id of the service to be created. * @param[in] basic_status The basic status of the service to be created. * @param[in] contact A string containing a contact information corresponding to the service to be created. - * @returns The created #LinphonePresenceService object. + * @return The created #LinphonePresenceService object. */ LINPHONE_PUBLIC LinphonePresenceService * linphone_core_create_presence_service(LinphoneCore *lc, const char *id, LinphonePresenceBasicStatus basic_status, const char *contact); diff --git a/coreapi/misc.c b/coreapi/misc.c index c238b13a0..99ea9182d 100644 --- a/coreapi/misc.c +++ b/coreapi/misc.c @@ -177,7 +177,7 @@ static int lookup_vbr_typical_bitrate(int maxbw, int clock_rate){ static int get_audio_payload_bandwidth(LinphoneCore *lc, const PayloadType *pt, int maxbw){ if (linphone_core_payload_type_is_vbr(lc,pt)){ if (pt->flags & PAYLOAD_TYPE_BITRATE_OVERRIDE){ - ms_message("PayloadType %s/%i has bitrate override",pt->mime_type,pt->clock_rate); + ms_debug("PayloadType %s/%i has bitrate override",pt->mime_type,pt->clock_rate); return pt->normal_bitrate/1000; } return lookup_vbr_typical_bitrate(maxbw,pt->clock_rate); @@ -1449,7 +1449,7 @@ static void linphone_core_migrate_proxy_config(LinphoneCore *lc, LinphoneTranspo * Existing proxy configuration are added a transport parameter so that they continue using the unique transport that was set previously. * This function must be used just after creating the core, before any call to linphone_core_iterate() * @param lc the linphone core - * @returns 1 if migration was done, 0 if not done because unnecessary or already done, -1 in case of error. + * @return 1 if migration was done, 0 if not done because unnecessary or already done, -1 in case of error. * @ingroup initializing **/ int linphone_core_migrate_to_multi_transport(LinphoneCore *lc){ diff --git a/coreapi/private.h b/coreapi/private.h index 2aa0f6dd9..9978252fa 100644 --- a/coreapi/private.h +++ b/coreapi/private.h @@ -397,7 +397,7 @@ void linphone_core_get_local_ip(LinphoneCore *lc, int af, const char *dest, char LinphoneProxyConfig *linphone_proxy_config_new_from_config_file(LinphoneCore *lc, int index); void linphone_proxy_config_write_to_config_file(struct _LpConfig* config,LinphoneProxyConfig *obj, int index); -int linphone_proxy_config_normalize_number(LinphoneProxyConfig *cfg, const char *username, char *result, size_t result_len); +bool_t linphone_proxy_config_normalize_number(LinphoneProxyConfig *cfg, const char *username, char *result, size_t result_len); void linphone_core_message_received(LinphoneCore *lc, SalOp *op, const SalMessage *msg); void linphone_core_is_composing_received(LinphoneCore *lc, SalOp *op, const SalIsComposing *is_composing); diff --git a/coreapi/proxy.c b/coreapi/proxy.c index 807a03db3..beed88ce3 100644 --- a/coreapi/proxy.c +++ b/coreapi/proxy.c @@ -879,7 +879,7 @@ static void lookup_dial_plan(const char *ccc, dial_plan_t *plan){ strcpy(plan->ccc,ccc); } -static bool_t is_a_phone_number(const char *username){ +bool_t linphone_proxy_config_is_phone_number(LinphoneProxyConfig *proxy, const char *username){ const char *p; for(p=username;*p!='\0';++p){ if (isdigit(*p) || @@ -927,9 +927,8 @@ static void replace_plus(const char *src, char *dest, size_t destlen, const char } -int linphone_proxy_config_normalize_number(LinphoneProxyConfig *proxy, const char *username, char *result, size_t result_len){ - int numlen; - if (is_a_phone_number(username)){ +bool_t linphone_proxy_config_normalize_number(LinphoneProxyConfig *proxy, const char *username, char *result, size_t result_len){ + if (linphone_proxy_config_is_phone_number(proxy, username)){ char *flatten; flatten=flatten_number(username); ms_debug("Flattened number is '%s'",flatten); @@ -938,7 +937,6 @@ int linphone_proxy_config_normalize_number(LinphoneProxyConfig *proxy, const cha /*no prefix configured, nothing else to do*/ strncpy(result,flatten,result_len); ms_free(flatten); - return 0; }else{ dial_plan_t dialplan; lookup_dial_plan(proxy->dial_prefix,&dialplan); @@ -949,8 +947,8 @@ int linphone_proxy_config_normalize_number(LinphoneProxyConfig *proxy, const cha /*eventually replace the plus*/ replace_plus(flatten,result,result_len,proxy->dial_escape_plus ? dialplan.icp : NULL); ms_free(flatten); - return 0; }else{ + int numlen; int i=0; int skip; numlen=strlen(flatten); @@ -975,8 +973,11 @@ int linphone_proxy_config_normalize_number(LinphoneProxyConfig *proxy, const cha ms_free(flatten); } } - }else strncpy(result,username,result_len); - return 0; + return TRUE; + } else { + strncpy(result,username,result_len); + return FALSE; + } } /** diff --git a/mediastreamer2 b/mediastreamer2 index 2f03f8b38..a27c77bdc 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit 2f03f8b386bf20ff27a1ecfad916a65ae5653a82 +Subproject commit a27c77bdc96bbc4d727a5d6226a0587cbe8c5aa3 diff --git a/oRTP b/oRTP index 9eca0967d..723deb7e9 160000 --- a/oRTP +++ b/oRTP @@ -1 +1 @@ -Subproject commit 9eca0967dd773c364dcfce09ec13138338767872 +Subproject commit 723deb7e9e016f5134a6f708f28ee95694e97068 diff --git a/po/ar.po b/po/ar.po index f8773b668..c5eaa0244 100644 --- a/po/ar.po +++ b/po/ar.po @@ -4,14 +4,14 @@ # # Translators: # محيي الدين , 2014 -# محيي الدين , 2014 +# محيي الدين , 2014-2015 msgid "" msgstr "" "Project-Id-Version: linphone-gtk\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-01-06 12:28+0100\n" -"PO-Revision-Date: 2015-01-06 11:29+0000\n" -"Last-Translator: Gautier Pelloux-Prayer \n" +"POT-Creation-Date: 2015-01-13 16:18+0100\n" +"PO-Revision-Date: 2015-01-06 14:11+0000\n" +"Last-Translator: محيي الدين \n" "Language-Team: Arabic (http://www.transifex.com/projects/p/linphone-gtk/" "language/ar/)\n" "Language: ar\n" @@ -146,7 +146,7 @@ msgstr "ابدأ مرشد الصوت" #: ../gtk/main.c:172 msgid "Run self test and exit 0 if succeed" -msgstr "" +msgstr "شغِّل الاختبار الذاتي ثم اخرِجْ 0 إذا نجح" #: ../gtk/main.c:1083 #, c-format @@ -1262,7 +1262,7 @@ msgstr "منفذ SIP/UDP" #: ../gtk/parameters.ui.h:21 msgid "Random" -msgstr "" +msgstr "عشوائي" #: ../gtk/parameters.ui.h:22 msgid "SIP/TCP port" @@ -1378,7 +1378,7 @@ msgstr "طريقة إخراج الفيديو :" #: ../gtk/parameters.ui.h:50 msgid "Show camera preview" -msgstr "" +msgstr "اظهر معاينة الكاميرا" #: ../gtk/parameters.ui.h:51 msgid "Video" @@ -1874,7 +1874,7 @@ msgstr "" "هوية SIP التي أدخلت غير صحيحة.\n" "يجب أن تشبه هذا النمط sip:username@proxydomain، مثلا sip:alice@example.net" -#: ../coreapi/proxy.c:1390 +#: ../coreapi/proxy.c:1391 #, c-format msgid "Could not login as %s" msgstr "تعذر الولوج بالهوية %s" diff --git a/po/cs.po b/po/cs.po index a4f6b849b..1df2c980c 100644 --- a/po/cs.po +++ b/po/cs.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: linphone-gtk\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-01-06 12:28+0100\n" +"POT-Creation-Date: 2015-01-13 16:18+0100\n" "PO-Revision-Date: 2015-01-06 11:29+0000\n" "Last-Translator: Gautier Pelloux-Prayer \n" "Language-Team: Czech (http://www.transifex.com/projects/p/linphone-gtk/" @@ -1845,7 +1845,7 @@ msgstr "" "SIP identita, kterou jste zadali, není platná.\n" "Měla by mít tvar sip:uživatel@proxydoména, například sip:alice@example.net" -#: ../coreapi/proxy.c:1390 +#: ../coreapi/proxy.c:1391 #, c-format msgid "Could not login as %s" msgstr "Nelze se přihlásit jako %s" diff --git a/po/de.po b/po/de.po index 613593329..2446bd02c 100644 --- a/po/de.po +++ b/po/de.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: linphone-gtk\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-01-06 12:28+0100\n" +"POT-Creation-Date: 2015-01-13 16:18+0100\n" "PO-Revision-Date: 2015-01-06 11:29+0000\n" "Last-Translator: Gautier Pelloux-Prayer \n" "Language-Team: German (http://www.transifex.com/projects/p/linphone-gtk/" @@ -1880,7 +1880,7 @@ msgstr "" "Sie sollte wie sip:benutzername@proxydomain aussehen, also z.B. sip:" "alice@beispiel.net" -#: ../coreapi/proxy.c:1390 +#: ../coreapi/proxy.c:1391 #, c-format msgid "Could not login as %s" msgstr "Anmeldung als %s fehlgeschlagen" diff --git a/po/es.po b/po/es.po index 856cad9c6..6a133760e 100644 --- a/po/es.po +++ b/po/es.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: linphone-gtk\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-01-06 12:28+0100\n" +"POT-Creation-Date: 2015-01-13 16:18+0100\n" "PO-Revision-Date: 2015-01-06 11:29+0000\n" "Last-Translator: Gautier Pelloux-Prayer \n" "Language-Team: Spanish (http://www.transifex.com/projects/p/linphone-gtk/" @@ -1830,7 +1830,7 @@ msgstr "" "Debe ser del tipo sip:username@proxydomain, como por ejemplo sip:" "alice@example.net" -#: ../coreapi/proxy.c:1390 +#: ../coreapi/proxy.c:1391 #, c-format msgid "Could not login as %s" msgstr "" diff --git a/po/fr.po b/po/fr.po index 54a0968b9..23a2060fa 100644 --- a/po/fr.po +++ b/po/fr.po @@ -11,8 +11,8 @@ msgid "" msgstr "" "Project-Id-Version: linphone-gtk\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-01-06 12:28+0100\n" -"PO-Revision-Date: 2015-01-06 11:31+0000\n" +"POT-Creation-Date: 2015-01-13 16:18+0100\n" +"PO-Revision-Date: 2015-01-06 11:41+0000\n" "Last-Translator: Gautier Pelloux-Prayer \n" "Language-Team: French (http://www.transifex.com/projects/p/linphone-gtk/" "language/fr/)\n" @@ -1878,7 +1878,7 @@ msgstr "" "Elle doit être de la forme sip:username@domain, comme par example sip:" "alice@example.net" -#: ../coreapi/proxy.c:1390 +#: ../coreapi/proxy.c:1391 #, c-format msgid "Could not login as %s" msgstr "Echec de la connexion en tant que %s" diff --git a/po/he.po b/po/he.po index 573a9e1a9..4feae78d6 100644 --- a/po/he.po +++ b/po/he.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: linphone-gtk\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-01-06 12:28+0100\n" +"POT-Creation-Date: 2015-01-13 16:18+0100\n" "PO-Revision-Date: 2015-01-06 11:29+0000\n" "Last-Translator: Gautier Pelloux-Prayer \n" "Language-Team: Hebrew (http://www.transifex.com/projects/p/linphone-gtk/" @@ -1841,7 +1841,7 @@ msgstr "" "זהות sip שהוזנה הינה שגויה.\n" "זו צריכה להיראות כמו sip:username@proxydomain, למשל sip:alice@example.net" -#: ../coreapi/proxy.c:1390 +#: ../coreapi/proxy.c:1391 #, c-format msgid "Could not login as %s" msgstr "לא ניתן להתחבר בזהות %s" diff --git a/po/hu.po b/po/hu.po index 8d4bef4d7..e9b61953f 100644 --- a/po/hu.po +++ b/po/hu.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: linphone-gtk\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-01-06 12:28+0100\n" +"POT-Creation-Date: 2015-01-13 16:18+0100\n" "PO-Revision-Date: 2015-01-06 11:29+0000\n" "Last-Translator: Gautier Pelloux-Prayer \n" "Language-Team: Hungarian (http://www.transifex.com/projects/p/linphone-gtk/" @@ -1843,7 +1843,7 @@ msgstr "" "Így kéne kinéznie: sip:felhasznalonev@proxytartomany, például sip:" "aladar@pelda.hu" -#: ../coreapi/proxy.c:1390 +#: ../coreapi/proxy.c:1391 #, c-format msgid "Could not login as %s" msgstr "Nem sikerült belépni ezzel: %s" diff --git a/po/it.po b/po/it.po index 90bd17dca..111737c48 100644 --- a/po/it.po +++ b/po/it.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: linphone-gtk\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-01-06 12:28+0100\n" +"POT-Creation-Date: 2015-01-13 16:18+0100\n" "PO-Revision-Date: 2015-01-06 11:29+0000\n" "Last-Translator: Gautier Pelloux-Prayer \n" "Language-Team: Italian (http://www.transifex.com/projects/p/linphone-gtk/" @@ -1822,7 +1822,7 @@ msgstr "" "L'identità sip utilizza è invalida.\n" "Dovrebbre essere sip:username@proxydomain, esempio: sip:alice@example.net" -#: ../coreapi/proxy.c:1390 +#: ../coreapi/proxy.c:1391 #, c-format msgid "Could not login as %s" msgstr "impossibile login come %s" diff --git a/po/ja.po b/po/ja.po index 3a4494abe..0ebeaa016 100644 --- a/po/ja.po +++ b/po/ja.po @@ -9,9 +9,9 @@ msgid "" msgstr "" "Project-Id-Version: linphone-gtk\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-01-06 12:28+0100\n" -"PO-Revision-Date: 2015-01-06 11:29+0000\n" -"Last-Translator: Gautier Pelloux-Prayer \n" +"POT-Creation-Date: 2015-01-13 16:18+0100\n" +"PO-Revision-Date: 2015-01-09 16:31+0000\n" +"Last-Translator: Alexander\n" "Language-Team: Japanese (http://www.transifex.com/projects/p/linphone-gtk/" "language/ja/)\n" "Language: ja\n" @@ -1841,7 +1841,7 @@ msgid "" "It should look like sip:username@proxydomain, such as sip:alice@example.net" msgstr "" -#: ../coreapi/proxy.c:1390 +#: ../coreapi/proxy.c:1391 #, c-format msgid "Could not login as %s" msgstr "" @@ -1999,4 +1999,4 @@ msgstr "" #: ../gtk/videowindow.c:66 #, c-format msgid "Cannot play %s." -msgstr "" +msgstr "%s が再生出来ません。" diff --git a/po/nb_NO.po b/po/nb_NO.po index a17243481..fb7035231 100644 --- a/po/nb_NO.po +++ b/po/nb_NO.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: linphone-gtk\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-01-06 12:28+0100\n" +"POT-Creation-Date: 2015-01-13 16:18+0100\n" "PO-Revision-Date: 2015-01-06 11:29+0000\n" "Last-Translator: Gautier Pelloux-Prayer \n" "Language-Team: Norwegian Bokmål (Norway) (http://www.transifex.com/projects/" @@ -1829,7 +1829,7 @@ msgstr "" "SIP adressen du har angitt er feil. Adressen bør se ut som sip: " "brukernavn@domenenavn, f.eks sip:ola@eksempel.no" -#: ../coreapi/proxy.c:1390 +#: ../coreapi/proxy.c:1391 #, c-format msgid "Could not login as %s" msgstr "Ikke ikke logge inn som %s" diff --git a/po/nl.po b/po/nl.po index 243364c8b..cfda5add0 100644 --- a/po/nl.po +++ b/po/nl.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: linphone-gtk\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-01-06 12:28+0100\n" +"POT-Creation-Date: 2015-01-13 16:18+0100\n" "PO-Revision-Date: 2015-01-06 11:29+0000\n" "Last-Translator: Gautier Pelloux-Prayer \n" "Language-Team: Dutch (http://www.transifex.com/projects/p/linphone-gtk/" @@ -1812,7 +1812,7 @@ msgid "" "It should look like sip:username@proxydomain, such as sip:alice@example.net" msgstr "" -#: ../coreapi/proxy.c:1390 +#: ../coreapi/proxy.c:1391 #, c-format msgid "Could not login as %s" msgstr "" diff --git a/po/pl.po b/po/pl.po index d61587d3f..f83b391c4 100644 --- a/po/pl.po +++ b/po/pl.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: linphone-gtk\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-01-06 12:28+0100\n" +"POT-Creation-Date: 2015-01-13 16:18+0100\n" "PO-Revision-Date: 2015-01-06 11:29+0000\n" "Last-Translator: Gautier Pelloux-Prayer \n" "Language-Team: Polish (http://www.transifex.com/projects/p/linphone-gtk/" @@ -1816,7 +1816,7 @@ msgid "" "It should look like sip:username@proxydomain, such as sip:alice@example.net" msgstr "" -#: ../coreapi/proxy.c:1390 +#: ../coreapi/proxy.c:1391 #, c-format msgid "Could not login as %s" msgstr "" diff --git a/po/pt_BR.po b/po/pt_BR.po index 7fe04b407..8f7a8c319 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: linphone-gtk\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-01-06 12:28+0100\n" +"POT-Creation-Date: 2015-01-13 16:18+0100\n" "PO-Revision-Date: 2015-01-06 11:29+0000\n" "Last-Translator: Gautier Pelloux-Prayer \n" "Language-Team: Portuguese (Brazil) (http://www.transifex.com/projects/p/" @@ -1812,7 +1812,7 @@ msgid "" "It should look like sip:username@proxydomain, such as sip:alice@example.net" msgstr "" -#: ../coreapi/proxy.c:1390 +#: ../coreapi/proxy.c:1391 #, c-format msgid "Could not login as %s" msgstr "" diff --git a/po/ru.po b/po/ru.po index 6ffa7ef1f..fd7b8f5b9 100644 --- a/po/ru.po +++ b/po/ru.po @@ -4,7 +4,7 @@ # # Translators: # AlexL , 2014 -# AlexL , 2014 +# AlexL , 2014-2015 # AlexL , 2014 # Maxim Prokopyev , 2010 # Simon Morlat , 2001 @@ -12,9 +12,9 @@ msgid "" msgstr "" "Project-Id-Version: linphone-gtk\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-01-06 12:28+0100\n" -"PO-Revision-Date: 2015-01-06 11:29+0000\n" -"Last-Translator: Gautier Pelloux-Prayer \n" +"POT-Creation-Date: 2015-01-13 16:18+0100\n" +"PO-Revision-Date: 2015-01-07 08:31+0000\n" +"Last-Translator: AlexL \n" "Language-Team: Russian (http://www.transifex.com/projects/p/linphone-gtk/" "language/ru/)\n" "Language: ru\n" @@ -146,7 +146,7 @@ msgstr "Запустить помощника аудио" #: ../gtk/main.c:172 msgid "Run self test and exit 0 if succeed" -msgstr "" +msgstr "Запустить самотест и выйти при успехе со статусом 0" #: ../gtk/main.c:1083 #, c-format @@ -1264,7 +1264,7 @@ msgstr "Порт SIP/UDP" #: ../gtk/parameters.ui.h:21 msgid "Random" -msgstr "" +msgstr "Случайно" #: ../gtk/parameters.ui.h:22 msgid "SIP/TCP port" @@ -1380,7 +1380,7 @@ msgstr "Метод вывода видео:" #: ../gtk/parameters.ui.h:50 msgid "Show camera preview" -msgstr "" +msgstr "Показать предпросмотр с камеры" #: ../gtk/parameters.ui.h:51 msgid "Video" @@ -1882,7 +1882,7 @@ msgstr "" "Должно выглядеть как sip:имя_пользователя@домен_прокси, как например, sip:" "alice@example.net" -#: ../coreapi/proxy.c:1390 +#: ../coreapi/proxy.c:1391 #, c-format msgid "Could not login as %s" msgstr "Невозможно зайти как: %s" diff --git a/po/sr.po b/po/sr.po index ff2a80f96..ae6f5da59 100644 --- a/po/sr.po +++ b/po/sr.po @@ -8,9 +8,9 @@ msgid "" msgstr "" "Project-Id-Version: linphone-gtk\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-01-06 12:28+0100\n" -"PO-Revision-Date: 2015-01-06 11:29+0000\n" -"Last-Translator: Gautier Pelloux-Prayer \n" +"POT-Creation-Date: 2015-01-13 16:18+0100\n" +"PO-Revision-Date: 2015-01-07 17:21+0000\n" +"Last-Translator: Мирослав Николић \n" "Language-Team: Serbian (http://www.transifex.com/projects/p/linphone-gtk/" "language/sr/)\n" "Language: sr\n" @@ -140,7 +140,7 @@ msgstr "Покреће помоћника звука" #: ../gtk/main.c:172 msgid "Run self test and exit 0 if succeed" -msgstr "" +msgstr "Покреће самоиспробавање и излази 0 ако је успешно" #: ../gtk/main.c:1083 #, c-format @@ -1258,7 +1258,7 @@ msgstr "СИП/УДП прикључник" #: ../gtk/parameters.ui.h:21 msgid "Random" -msgstr "" +msgstr "Насумично" #: ../gtk/parameters.ui.h:22 msgid "SIP/TCP port" @@ -1374,7 +1374,7 @@ msgstr "Начин излаза снимка:" #: ../gtk/parameters.ui.h:50 msgid "Show camera preview" -msgstr "" +msgstr "Прикажи претпреглед камерице" #: ../gtk/parameters.ui.h:51 msgid "Video" @@ -1873,7 +1873,7 @@ msgstr "" "Треба да изгледа као „sip:корисник@домен-посредника, као што је „sip:" "alice@example.net“" -#: ../coreapi/proxy.c:1390 +#: ../coreapi/proxy.c:1391 #, c-format msgid "Could not login as %s" msgstr "Не могу да се пријавим као %s" diff --git a/po/sv.po b/po/sv.po index 0127ae3d8..b43407cf6 100644 --- a/po/sv.po +++ b/po/sv.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: linphone-gtk\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-01-06 12:28+0100\n" +"POT-Creation-Date: 2015-01-13 16:18+0100\n" "PO-Revision-Date: 2015-01-06 11:29+0000\n" "Last-Translator: Gautier Pelloux-Prayer \n" "Language-Team: Swedish (http://www.transifex.com/projects/p/linphone-gtk/" @@ -1825,7 +1825,7 @@ msgstr "" "SIP adressen som du matade in är inte rätt. Adressen borde se ut som sip:" "namn@domän, såsom sip:peter@exempel.se" -#: ../coreapi/proxy.c:1390 +#: ../coreapi/proxy.c:1391 #, c-format msgid "Could not login as %s" msgstr "Kunde inte logga in som %s" diff --git a/po/zh_CN.po b/po/zh_CN.po index fcafc6c1b..44b01c13b 100644 --- a/po/zh_CN.po +++ b/po/zh_CN.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: linphone-gtk\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-01-06 12:28+0100\n" +"POT-Creation-Date: 2015-01-13 16:18+0100\n" "PO-Revision-Date: 2015-01-06 11:29+0000\n" "Last-Translator: Gautier Pelloux-Prayer \n" "Language-Team: Chinese (China) (http://www.transifex.com/projects/p/linphone-" @@ -1818,7 +1818,7 @@ msgstr "" "您输入的地址无效。\n" "它应具有“sip:用户名@代理域”的形式,例如 sip:alice@example.net" -#: ../coreapi/proxy.c:1390 +#: ../coreapi/proxy.c:1391 #, c-format msgid "Could not login as %s" msgstr "无法登录为 %s" diff --git a/po/zh_TW.po b/po/zh_TW.po index f1de4bbc7..cf24e3fc7 100644 --- a/po/zh_TW.po +++ b/po/zh_TW.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: linphone-gtk\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-01-06 12:28+0100\n" +"POT-Creation-Date: 2015-01-13 16:18+0100\n" "PO-Revision-Date: 2015-01-06 11:29+0000\n" "Last-Translator: Gautier Pelloux-Prayer \n" "Language-Team: Chinese (Taiwan) (http://www.transifex.com/projects/p/" @@ -1820,7 +1820,7 @@ msgstr "" "您輸入的 sip 身分是無效的。\n" "它應該看起來像 sip:使用者名稱@代理網域,像是 sip:alice@example.net" -#: ../coreapi/proxy.c:1390 +#: ../coreapi/proxy.c:1391 #, c-format msgid "Could not login as %s" msgstr "無法以 %s 登入" diff --git a/share/audio-assistant.desktop.in b/share/audio-assistant.desktop.in index dc0734bc6..72c871521 100644 --- a/share/audio-assistant.desktop.in +++ b/share/audio-assistant.desktop.in @@ -1,5 +1,6 @@ [Desktop Entry] Name=Audio assistant +GenericName=Audio assistant Name[ru]=Помощник аудио Comment=Linphone audio assistant Comment[fr]=Assistant audio de Linphone. @@ -8,4 +9,4 @@ Type=Application Exec=linphone --run-audio-assistant Icon=@prefix@/share/pixmaps/linphone/linphone.png Terminal=false -Categories=Network;Telephony; \ No newline at end of file +Categories=Network;Telephony; diff --git a/share/linphone.desktop.in b/share/linphone.desktop.in index 725c7e105..748076ecf 100644 --- a/share/linphone.desktop.in +++ b/share/linphone.desktop.in @@ -1,5 +1,6 @@ [Desktop Entry] Name=Linphone +GenericName=Web-phone Comment=Linphone is a web-phone Type=Application Exec=linphone diff --git a/tester/call_tester.c b/tester/call_tester.c index 9826040cd..ca02f9ef3 100644 --- a/tester/call_tester.c +++ b/tester/call_tester.c @@ -1582,7 +1582,7 @@ static void video_call_base(LinphoneCoreManager* pauline,LinphoneCoreManager* ma LinphoneCall* marie_call; LinphoneCall* pauline_call; LinphoneVideoPolicy marie_policy, pauline_policy; - + linphone_core_enable_video_capture(marie->lc, TRUE); linphone_core_enable_video_display(marie->lc, TRUE); linphone_core_enable_video_capture(pauline->lc, TRUE); @@ -1708,17 +1708,17 @@ static void video_call_with_early_media_no_matching_audio_codecs(void) { LinphoneCoreManager *pauline = linphone_core_manager_new("pauline_rc"); LinphoneCall *out_call; LinphoneVideoPolicy vpol={0}; - + linphone_core_enable_video_capture(marie->lc, TRUE); linphone_core_enable_video_display(marie->lc, TRUE); linphone_core_enable_video_capture(pauline->lc, TRUE); linphone_core_enable_video_display(pauline->lc, FALSE); - + vpol.automatically_initiate=TRUE; vpol.automatically_accept=TRUE; linphone_core_set_video_policy(pauline->lc,&vpol); linphone_core_set_video_policy(marie->lc,&vpol); - + linphone_core_enable_payload_type(marie->lc, linphone_core_find_payload_type(marie->lc, "PCMU", 8000, 1), FALSE); /* Disable PCMU */ linphone_core_enable_payload_type(marie->lc, linphone_core_find_payload_type(marie->lc, "PCMA", 8000, 1), TRUE); /* Enable PCMA */ @@ -1734,20 +1734,20 @@ static void video_call_with_early_media_no_matching_audio_codecs(void) { CU_ASSERT_TRUE(wait_for(marie->lc, pauline->lc, &marie->stat.number_of_LinphoneCallOutgoingEarlyMedia, 1)); /*audio stream shall not have been requested to start*/ CU_ASSERT_PTR_NULL(linphone_core_get_current_call(pauline->lc)->audiostream->soundread); - + CU_ASSERT_TRUE(linphone_call_params_video_enabled(linphone_call_get_current_params(out_call))==TRUE); CU_ASSERT_TRUE(linphone_call_params_video_enabled(linphone_call_get_current_params(linphone_core_get_current_call(pauline->lc)))==TRUE); - + linphone_core_accept_call(pauline->lc, linphone_core_get_current_call(pauline->lc)); - + CU_ASSERT_TRUE(wait_for(marie->lc, pauline->lc, &pauline->stat.number_of_LinphoneCallStreamsRunning, 1)); CU_ASSERT_TRUE(wait_for(marie->lc, pauline->lc, &marie->stat.number_of_LinphoneCallStreamsRunning, 1)); - + linphone_core_terminate_call(marie->lc, out_call); - + CU_ASSERT_TRUE(wait_for(marie->lc, pauline->lc, &pauline->stat.number_of_LinphoneCallEnd, 1)); CU_ASSERT_TRUE(wait_for(marie->lc, pauline->lc, &marie->stat.number_of_LinphoneCallEnd, 1)); - + linphone_call_unref(out_call); linphone_core_manager_destroy(marie); linphone_core_manager_destroy(pauline); @@ -2228,12 +2228,17 @@ static void call_with_mkv_file_player(void) { linphone_core_terminate_all_calls(marie->lc); CU_ASSERT_TRUE(wait_for(pauline->lc,marie->lc,&pauline->stat.number_of_LinphoneCallEnd,1)); CU_ASSERT_TRUE(wait_for(pauline->lc,marie->lc,&marie->stat.number_of_LinphoneCallEnd,1)); +#ifdef ANDROID + /*inter-correlation process is too much CPU consuming ending in a 20 minutes test on Android...*/ + remove(recordpath); +#else CU_ASSERT_TRUE(ms_audio_diff(hellowav,recordpath,&similar,NULL,NULL)==0); CU_ASSERT_TRUE(similar>threshold); CU_ASSERT_TRUE(similar<=1.0); if(similar>threshold && similar<=1.0) { remove(recordpath); } +#endif ms_free(recordpath); end: diff --git a/tester/log_collection_tester.c b/tester/log_collection_tester.c index c7b43beb7..35cf8d1f2 100644 --- a/tester/log_collection_tester.c +++ b/tester/log_collection_tester.c @@ -27,6 +27,10 @@ #include "private.h" #include "liblinphone_tester.h" +#ifdef HAVE_ZLIB +#include +#endif + /*getline is not available on android...*/ #ifdef ANDROID @@ -84,10 +88,24 @@ size_t getline(char **lineptr, size_t *n, FILE *stream) { } #endif +static LinphoneLogCollectionState old_collection_state; +void collect_init() { + old_collection_state = linphone_core_log_collection_enabled(); + linphone_core_set_log_collection_path(liblinphone_tester_writable_dir_prefix); +} + +void collect_cleanup(LinphoneCoreManager *marie) { + linphone_core_manager_destroy(marie); + + linphone_core_enable_log_collection(old_collection_state); + linphone_core_reset_log_collection(); +} + LinphoneCoreManager* setup(bool_t enable_logs) { LinphoneCoreManager *marie; int timeout = 300; + collect_init(); linphone_core_enable_log_collection(enable_logs); marie = linphone_core_manager_new( "marie_rc"); @@ -100,23 +118,51 @@ LinphoneCoreManager* setup(bool_t enable_logs) { return marie; } +#if HAVE_ZLIB +/*returns uncompressed log file*/ +FILE* gzuncompress(const char* filepath) { + gzFile file = gzopen(filepath, "rb"); + FILE *output = NULL; + char *newname = ms_strdup_printf("%s.txt", filepath); + char buffer[512]; + output = fopen(newname, "w+"); + while (gzread(file, buffer, 511) > 0) { + fputs(buffer, output); + memset(buffer, 0, strlen(buffer)); + } + + CU_ASSERT_EQUAL(gzclose(file), Z_OK); + ms_free(newname); + + fseek(output, 0, SEEK_SET); + return (FILE*)output; +} +#endif + time_t check_file(LinphoneCoreManager* mgr) { time_t last_log = ms_time(NULL); char* filepath = linphone_core_compress_log_collection(mgr->lc); time_t time_curr = -1; uint32_t timediff = 0; + FILE *file = NULL; - CU_ASSERT_PTR_NOT_NULL(filepath); + CU_ASSERT_PTR_NOT_NULL(filepath); if (filepath != NULL) { int line_count = 0; - FILE *file = fopen(filepath, "r"); char *line = NULL; size_t line_size = 256; struct tm tm_curr; time_t time_prev = -1; +#if HAVE_ZLIB + // 0) if zlib is enabled, we must decompress the file first + file = gzuncompress(filepath); +#else + file = fopen(filepath, "r"); +#endif + // 1) expect to find folder name in filename path CU_ASSERT_PTR_NOT_NULL(strstr(filepath, liblinphone_tester_writable_dir_prefix)); @@ -124,7 +170,6 @@ time_t check_file(LinphoneCoreManager* mgr) { while (getline(&line, &line_size, file) != -1) { // a) there should be at least 25 lines ++line_count; - // b) logs should be ordered by date (format: 2014-11-04 15:22:12:606) if (strlen(line) > 24) { char date[24] = {'\0'}; @@ -140,48 +185,35 @@ time_t check_file(LinphoneCoreManager* mgr) { free(line); fclose(file); ms_free(filepath); - } - timediff = labs((long int)time_curr - (long int)last_log); + timediff = labs((long int)time_curr - (long int)last_log); - CU_ASSERT_TRUE( timediff <= 1 ); - if( !(timediff <= 1) ){ - ms_error("time_curr: %ld, last_log: %ld timediff: %d", time_curr, last_log, timediff ); + CU_ASSERT_TRUE( timediff <= 1 ); + if( !(timediff <= 1) ){ + ms_error("time_curr: %ld, last_log: %ld timediff: %d", time_curr, last_log, timediff ); + } } // return latest time in file return time_curr; } -static LinphoneLogCollectionState old_collection_state; -static int collect_init() { - old_collection_state = linphone_core_log_collection_enabled(); - linphone_core_set_log_collection_path(liblinphone_tester_writable_dir_prefix); - return 0; -} - -static int collect_cleanup() { - linphone_core_enable_log_collection(old_collection_state); - linphone_core_reset_log_collection(); - return 0; -} - static void collect_files_disabled() { LinphoneCoreManager* marie = setup(FALSE); CU_ASSERT_PTR_NULL(linphone_core_compress_log_collection(marie->lc)); - linphone_core_manager_destroy(marie); + collect_cleanup(marie); } static void collect_files_filled() { LinphoneCoreManager* marie = setup(TRUE); check_file(marie); - linphone_core_manager_destroy(marie); + collect_cleanup(marie); } static void collect_files_small_size() { LinphoneCoreManager* marie = setup(TRUE); linphone_core_set_log_collection_max_file_size(5000); check_file(marie); - linphone_core_manager_destroy(marie); + collect_cleanup(marie); } static void collect_files_changing_size() { @@ -196,7 +228,7 @@ static void collect_files_changing_size() { check_file(marie); - linphone_core_manager_destroy(marie); + collect_cleanup(marie); } test_t log_collection_tests[] = { @@ -208,8 +240,8 @@ test_t log_collection_tests[] = { test_suite_t log_collection_test_suite = { "LogCollection", - collect_init, - collect_cleanup, + NULL, + NULL, sizeof(log_collection_tests) / sizeof(log_collection_tests[0]), log_collection_tests }; diff --git a/tools/python/unittests/linphonetester.py b/tools/python/unittests/linphonetester.py index 0d803c348..bc7392832 100644 --- a/tools/python/unittests/linphonetester.py +++ b/tools/python/unittests/linphonetester.py @@ -9,6 +9,7 @@ import time test_domain = "sipopen.example.org" +auth_domain = "sip.example.org" test_username = "liblinphone_tester" test_password = "secret" test_route = "sip2.linphone.org" @@ -21,6 +22,7 @@ else: def linphonetester_log_handler(level, msg): + import logging method = getattr(logging.getLogger("linphonetester"), level) if not msg.strip().startswith('[PYLINPHONE]'): msg = '[CORE] ' + msg diff --git a/tools/python/unittests/test_register.py b/tools/python/unittests/test_register.py index be6918251..f62da77e0 100644 --- a/tools/python/unittests/test_register.py +++ b/tools/python/unittests/test_register.py @@ -8,7 +8,7 @@ class RegisterCoreManager(CoreManager): @classmethod def auth_info_requested(cls, lc, realm, username, domain): - CoreManager.auth_info_requested(cls, lc, realm, username, domain) + CoreManager.auth_info_requested(lc, realm, username, domain) info = linphone.AuthInfo.new(test_username, None, test_password, None, realm, domain) # Create authentication structure from identity lc.add_auth_info(info) # Add authentication info to LinphoneCore @@ -145,3 +145,47 @@ class TestRegister: pc.server_addr = "sip:{domain}:{port};transport=tls".format(domain=addr.domain, port=port) pc.done() assert_equals(CoreManager.wait_for_until(cm, cm, lambda cm1, cm2: cm1.stats.number_of_LinphoneRegistrationFailed == 1, 5000), True) + + def test_simple_authenticated_register(self): + cm = RegisterCoreManager() + info = linphone.AuthInfo.new(test_username, None, test_password, None, auth_domain, None) # Create authentication structure from identity + cm.lc.add_auth_info(info) + cm.register_with_refresh(False, auth_domain, "sip:{route}".format(route=test_route)) + assert_equals(cm.stats.number_of_auth_info_requested, 0) + + def test_digest_auth_without_initial_credentials(self): + cm = RegisterCoreManager(with_auth=True) + cm.register_with_refresh(False, auth_domain, "sip:{route}".format(route=test_route)) + assert_equals(cm.stats.number_of_auth_info_requested, 1) + + def test_authenticated_register_with_late_credentials(self): + cm = RegisterCoreManager() + cm.register_with_refresh(False, auth_domain, "sip:{route}".format(route=test_route), True, linphone.SipTransports(5070, 5070, 5071, 0)) + assert_equals(cm.stats.number_of_auth_info_requested, 1) + + def test_simple_register_with_refresh(self): + cm = RegisterCoreManager() + cm.register_with_refresh(True, None, None) + assert_equals(cm.stats.number_of_auth_info_requested, 0) + + def test_simple_auth_register_with_refresh(self): + cm = RegisterCoreManager(with_auth=True) + cm.register_with_refresh(True, auth_domain, "sip:{route}".format(route=test_route)) + assert_equals(cm.stats.number_of_auth_info_requested, 1) + + def test_multiple_accounts(self): + cm = CoreManager('multi_account_rc', False) + assert_equals(CoreManager.wait_for(cm, cm, lambda cm1, cm2: cm1.stats.number_of_LinphoneRegistrationOk == len(cm.lc.proxy_config_list)), True) + + def test_transport_change(self): + cm = CoreManager('multi_account_rc', False) + number_of_udp_proxies = reduce(lambda x, y: x + int(y.transport == "udp"), cm.lc.proxy_config_list, 0) + total_number_of_proxies = len(cm.lc.proxy_config_list) + # Keep only UDP + tr = cm.lc.sip_transports + tr.tcp_port = 0 + tr.tls_port = 0 + tr.dtls_port = 0 + cm.lc.sip_transports = tr + assert_equals(CoreManager.wait_for(cm, cm, lambda cm1, cm2: cm1.stats.number_of_LinphoneRegistrationOk == number_of_udp_proxies), True) + assert_equals(CoreManager.wait_for(cm, cm, lambda cm1, cm2: cm1.stats.number_of_LinphoneRegistrationFailed == (total_number_of_proxies - number_of_udp_proxies)), True)