Signed-off-by: Taeyoung Kim <ty317.kim@samsung.com>
Change-Id: I762bb72a04aaaa37e2b3cfde8acfc7d29b0420b8
if (0 > ret) {
USB_LOG("FAIL: get_accessory_info(ad)");
elm_exit();
+ return ;
}
numOfApps = get_accessory_matched(ad);
if (0 > ret) {
USB_LOG("FAIL: get_host_info(ad)");
elm_exit();
+ return ;
}
numOfApps = get_host_matched(ad);
if (!type) {
USB_LOG("ERROR: Non existing type of popup\n");
elm_exit();
+ return -1;
}
ad->type = atoi(type);
USB_LOG("ERROR: The popup type(%d) does not exist\n", ad->type);
ad->isClientOrHost = USB_DEVICE_UNKNOWN;
elm_exit();
- break;
+ return -1;
}
switch(ad->type) {
return -1;;
}
remote.sun_family = AF_UNIX;
- strncpy(remote.sun_path, SOCK_PATH, sizeof(remote.sun_family));
+ strncpy(remote.sun_path, SOCK_PATH, strlen(SOCK_PATH) + 1 );
if (connect(sockFd, (struct sockaddr *)&remote, sizeof(remote)) == -1) {
USB_LOG("FAIL: connect()");
close(sockFd);