mirror of
https://github.com/morgan9e/UxPlay
synced 2026-04-14 00:04:13 +09:00
use plist_get_data_ptr not plist_get_data_val (libplist>=2.1.0)
This commit is contained in:
@@ -102,6 +102,10 @@ else ()
|
|||||||
endif()
|
endif()
|
||||||
if ( PLIST_FOUND )
|
if ( PLIST_FOUND )
|
||||||
message( STATUS "found libplist-${PLIST_VERSION}")
|
message( STATUS "found libplist-${PLIST_VERSION}")
|
||||||
|
pkg_check_modules ( PLIST_21 libplist-2.0>=2.1.0 )
|
||||||
|
if ( PLIST_21_FOUND )
|
||||||
|
add_definitions( -DPLIST_210 )
|
||||||
|
endif()
|
||||||
pkg_check_modules ( PLIST_23 libplist-2.0>=2.3.0 )
|
pkg_check_modules ( PLIST_23 libplist-2.0>=2.3.0 )
|
||||||
if ( PLIST_23_FOUND )
|
if ( PLIST_23_FOUND )
|
||||||
add_definitions( -DPLIST_230 )
|
add_definitions( -DPLIST_230 )
|
||||||
|
|||||||
@@ -621,10 +621,14 @@ http_handler_action(raop_conn_t *conn, http_request_t *request, http_response_t
|
|||||||
}
|
}
|
||||||
|
|
||||||
uint_val = 0;
|
uint_val = 0;
|
||||||
char *fcup_response_data = NULL;
|
#ifdef PLIST_210
|
||||||
plist_get_data_val(req_params_fcup_response_data_node, &fcup_response_data, &uint_val);
|
const char *fcup_response_data = NULL;
|
||||||
|
fcup_response_data = plist_get_data_ptr(req_params_fcup_response_data_node, &uint_val);
|
||||||
|
#else
|
||||||
|
char *fcup_response_data = NULL;
|
||||||
|
fcup_response_data = plist_get_data_val(req_params_fcup_response_data_node, &fcup_response_data, &uint_val);
|
||||||
|
#endif
|
||||||
fcup_response_datalen = (int) uint_val;
|
fcup_response_datalen = (int) uint_val;
|
||||||
|
|
||||||
char *playlist = NULL;
|
char *playlist = NULL;
|
||||||
if (!fcup_response_data) {
|
if (!fcup_response_data) {
|
||||||
plist_mem_free(fcup_response_url);
|
plist_mem_free(fcup_response_url);
|
||||||
@@ -637,7 +641,9 @@ http_handler_action(raop_conn_t *conn, http_request_t *request, http_response_t
|
|||||||
}
|
}
|
||||||
playlist[fcup_response_datalen] = '\0';
|
playlist[fcup_response_datalen] = '\0';
|
||||||
memcpy(playlist, fcup_response_data, fcup_response_datalen);
|
memcpy(playlist, fcup_response_data, fcup_response_datalen);
|
||||||
|
#ifndef PLIST_210
|
||||||
plist_mem_free(fcup_response_data);
|
plist_mem_free(fcup_response_data);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
assert(playlist);
|
assert(playlist);
|
||||||
int playlist_len = strlen(playlist);
|
int playlist_len = strlen(playlist);
|
||||||
|
|||||||
Reference in New Issue
Block a user