Name: capi-media-screen-mirroring
Summary: A screen mirroring library in Tizen C API
-Version: 0.2.12
+Version: 0.2.13
Release: 1
Group: Multimedia/API
License: Apache-2.0
/* Connecting to the miracast server */
memset(&serv_addr, 0, sizeof(struct sockaddr_un));
serv_addr.sun_family = AF_UNIX;
- strncpy(serv_addr.sun_path, _scmirroring->sock_path, sizeof(serv_addr.sun_path));
- serv_addr.sun_path[sizeof(serv_addr.sun_path) - 1] = '\0';
+ g_strlcpy(serv_addr.sun_path, _scmirroring->sock_path, sizeof(serv_addr.sun_path));
try:
scmirroring_debug("Trying to connect to the miracast server");
g_io_channel_read_chars(channel, buf, MAX_STRING_LEN, &read, &error);
buf[read] = '\0';
+
+ if (read == 0) {
+ g_print ("Read 0 bytes! \n");
+ return FALSE;
+ } else {
+ g_print ("Read %" G_GSIZE_FORMAT "bytes \n", read);
+ }
+
g_strstrip(buf);
if (g_menu == MAIN_MENU)
g_io_channel_read_chars(channel, buf, MAX_STRING_LEN, &read, &error);
buf[read] = '\0';
+ if (read == 0) {
+ g_print ("Read 0 bytes! \n");
+ return FALSE;
+ } else {
+ g_print ("Read %" G_GSIZE_FORMAT "bytes \n", read);
+ }
+
g_strstrip(buf);
if (g_menu == MAIN_MENU)
g_io_channel_read_chars(channel, buf, MAX_STRING_LEN, &read, &error);
buf[read] = '\0';
+
+ if (read == 0) {
+ g_print ("Read 0 bytes! \n");
+ return FALSE;
+ } else {
+ g_print ("Read %" G_GSIZE_FORMAT "bytes \n", read);
+ }
+
g_strstrip(buf);
if (g_menu == MAIN_MENU)