fix potential bugs 89/106189/1 accepted/tizen/3.0/common/20161221.181515 accepted/tizen/3.0/ivi/20161221.103439 accepted/tizen/3.0/mobile/20161221.103344 accepted/tizen/3.0/tv/20161221.103403 accepted/tizen/3.0/wearable/20161221.103420 submit/tizen_3.0/20161221.011452
authorgreatim <jaewon81.lim@samsung.com>
Wed, 21 Dec 2016 01:06:21 +0000 (10:06 +0900)
committergreatim <jaewon81.lim@samsung.com>
Wed, 21 Dec 2016 01:06:21 +0000 (10:06 +0900)
fix NO_LOCK.STAT bugs for errno

Change-Id: Ic24d17fdf755d9d7b007db68b50b6fb2b30cee37
Signed-off-by: greatim <jaewon81.lim@samsung.com>
src/file_sync_service.c
src/transport.c

index 9377078..4dd0860 100644 (file)
@@ -387,8 +387,7 @@ static int handle_send_file(int s, int noti_fd, char *path, mode_t mode, char *b
             sdb_close(fd);
             sdb_unlink(path);
             fd = -1;
-            errno = saved_errno;
-            if(fail_errno(s, errno)) return -1;
+            if(fail_errno(s, saved_errno)) return -1;
         }
     }
 
index 616acab..7811628 100644 (file)
@@ -242,9 +242,7 @@ void send_packet(apacket *p, atransport *t)
 
     if (t == NULL) {
         D("Transport is null \n");
-        // Zap errno because print_packet() and other stuff have errno effect.
-        errno = 0;
-        fatal_errno("Transport is null");
+        fatal("Transport is null");
     }
 
     if(write_packet(t->transport_socket, t->serial, &p)){