/* NOTE that logic regarding sending file size and name before sending data may differ from application implementations.
* Here we use two magic string - 'expected name:' and 'expected size:' */
- expected_size = g_strdup_printf("expected size:%llu", st.st_size);
+ expected_size = g_strdup_printf("expected size:%llu", (unsigned long long)st.st_size);
expected_name = g_strdup_printf("expected name:%s", basename((char *)file_path));
ret = webrtc_data_channel_send_string(g_conns[index].channels[i], expected_size);
sum_size = 0;
while((read_size = read(fd, buffer, BUFFER_SIZE)) > 0) {
sum_size += read_size;
- g_print("[%zd / %llu]bytes is read", sum_size, st.st_size);
+ g_print("[%zd / %llu]bytes is read", sum_size, (unsigned long long)st.st_size);
ret = webrtc_data_channel_send_bytes(g_conns[index].channels[i], buffer, (unsigned int)read_size);
if (ret != WEBRTC_ERROR_NONE)