[UTC][push][Non-ACR][Added debugging logs for testhub TC failure]
authorIckhee Woo <ickhee.woo@samsung.com>
Wed, 6 Dec 2017 08:32:30 +0000 (17:32 +0900)
committerIckhee Woo <ickhee.woo@samsung.com>
Wed, 6 Dec 2017 08:32:30 +0000 (17:32 +0900)
Change-Id: I8d42e63f1688aa073ff35cb4a4cd16a268bc7204
Signed-off-by: Ickhee Woo <ickhee.woo@samsung.com>
src/utc/push/sppc-common.c
src/utc/push/utc-sppc-service.c

index c2f94aebeeeaa1a1e0f51caaee86598e02448e62..980bfb3d2d41dfc40283fa1625a43ca3c25b6a46 100755 (executable)
@@ -191,6 +191,7 @@ size_t CurlResponseCallback(char *ptr, size_t size, size_t nmemb, void *userdata
 */
 int CheckOutgoingNotification(OutgoingNotification *pstNotificationInfo)
 {
+       _LOG("CheckOutgoingNotification start");
        int ret;
 
        // NULL check
@@ -255,6 +256,7 @@ int CheckOutgoingNotification(OutgoingNotification *pstNotificationInfo)
 */
 int SendNotificationUsingCurl(OutgoingNotification *pstNotificationInfo, bool verbose)
 {
+       _LOG("SendNotificationUsingCurl start");
 
        char app_id_str[23];
        char app_secret_str[50];
@@ -644,6 +646,7 @@ int SendPushDataToServer(const char *push_app_id, const char *app_secret, const
                                        push_badge_option_e badge_option, int badge_number, long time_stamp, int type, int delay,
                                        const char *sender, bool verbose)
 {
+       _LOG("SendPushDataToServer start");
        int ret;
        OutgoingNotification stOutgoingData;
 
@@ -665,6 +668,7 @@ int SendPushDataToServer(const char *push_app_id, const char *app_secret, const
 
        if (CheckOutgoingNotification(&stOutgoingData))
        {
+               _LOG("CheckOutgoingNotification failed");
                return PUSH_SERVICE_ERROR_INVALID_PARAMETER;
        }
 
index 92b6912d3f6c6829c84ba86055707ea328240505..7ff853b660a05ce1b333163cd4b056be4be03de2 100755 (executable)
@@ -278,6 +278,7 @@ static void _st_cb(push_service_state_e st, const char *err, void *data)
                 }
             } else if(CMD_SENDPUSH == pt->cmd) {
                 _LOG("send push data to server");
+               _LOG("push_service_deregister() function is being called.");
                 int ret = push_service_get_registration_id(pv->conn, &pv->regid);
                 if (PUSH_SERVICE_ERROR_NONE != ret) {
                     _LOG("push_service_get_registration_id() function failed!");
@@ -289,6 +290,7 @@ static void _st_cb(push_service_state_e st, const char *err, void *data)
             }
 
             if(NOTIFY_NONE == pv->notify_op && CMD_END != pt->cmd) {
+               _LOG("NOTIFY_NONE && !CMD_END\n");
                 g_main_loop_quit(pv->ml);
             }
         } break;
@@ -414,6 +416,7 @@ static void _rgdg_cb(push_service_result_e result, const char *msg, void *user_d
 */
 void initialize_service(PushT* _pPushT, PushData* _pPushD)
 {
+    _LOG("initialize_service start");
     int ret = 0;
     char *app_id_utc = NULL;
     char *app_secret_utc = NULL;
@@ -464,6 +467,7 @@ void finialize_service(PushT* _pPushT, PushData* _pPushD)
 */
 void start_service(char *appid, PushT* _pPushT, PushData* _pPushD, int _op)
 {
+    _LOG("start_service start");
     int timeout_id = 0;
 
     _pPushD->op = _op;
@@ -483,6 +487,7 @@ void start_service(char *appid, PushT* _pPushT, PushData* _pPushD, int _op)
     g_main_loop_unref(_pPushD->ml);
 
     if(timeout_error) {
+        _LOG("timeout error");
         start_error = true;
     }