fix tmp code define 16/41116/2
authorinhyeok <i_bc.kim@samsung.com>
Wed, 13 May 2015 11:38:42 +0000 (20:38 +0900)
committerSangchul Lee <sc11.lee@samsung.com>
Wed, 8 Jul 2015 05:37:50 +0000 (14:37 +0900)
Change-Id: Id80e4fbeafefeff80eacd0fde6f1d8b4ca8fad5d
Signed-off-by: inhyeok <i_bc.kim@samsung.com>
packaging/capi-media-sound-manager.spec
src/sound_manager.c

index b858fca60f13c00bb92f71fc039732481433ea42..3f4f74fb0c1f6568400b4010209ed9936f7f6643 100755 (executable)
@@ -38,7 +38,6 @@ cp %{SOURCE1001} .
 %build
 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
 %cmake . -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
-export CFLAGS="$CFLAGS -DTMP_CODE"
 %__make %{?jobs:-j%jobs}
 
 %install
index cbfe3ca30a360c0b1fff3f2b2fd49d3e7aa11632..f4676fec52cd2db2cf86c80871e8a12a491c65ce 100644 (file)
@@ -17,6 +17,8 @@
 #include "sound_manager.h"
 #include "sound_manager_private.h"
 
+#define TMP_CODE
+
 _session_interrupt_info_s g_session_interrupt_cb_table = {0, NULL, NULL};
 _volume_changed_info_s g_volume_changed_cb_table = {NULL, NULL};
 _focus_watch_info_s g_focus_watch_cb_table = {-1, NULL, NULL};
@@ -891,25 +893,30 @@ int sound_manager_get_voip_session_mode (sound_session_voip_mode_e *mode)
        int ret = MM_ERROR_NONE;
        int session = 0;
        int session_options = 0;
+#ifndef TMP_CODE
        _session_mode_e _mode = 0;
+#endif
 
        if (mode == NULL) {
+               LOGI("mode is null");
                return __convert_sound_manager_error_code(__func__, MM_ERROR_INVALID_ARGUMENT);
        }
 
        ret = mm_session_get_current_information(&session, &session_options);
        if (ret != MM_ERROR_NONE) {
+               LOGI("session = %d, option = %d", session, session_options);
                return __convert_sound_manager_error_code(__func__, ret);
        } else if (session != MM_SESSION_TYPE_VOIP) {
                return __convert_sound_manager_error_code(__func__, MM_ERROR_POLICY_INTERNAL);
        }
-       ret = __get_session_mode(&_mode);
-       if (ret == MM_ERROR_NONE)
-               *mode = (sound_session_voip_mode_e)_mode;
 
 #ifdef TMP_CODE
        /* temporary code. When 2.4 feature for routing is fully implemented, it will be removed. */
        *mode = tmp_mode;
+#else
+       ret = __get_session_mode(&_mode);
+       if (ret == MM_ERROR_NONE)
+               *mode = (sound_session_voip_mode_e)_mode;
 #endif
 
        LOGI("returns : session=%p, mode=%d, ret=%p", session, *mode, ret);