From 96ea29a095c5fbb68927829e8cfcf97e39595bfe Mon Sep 17 00:00:00 2001 From: Martin Szulecki Date: Tue, 17 Jul 2012 18:50:27 +0200 Subject: asr: Add macros for other values of validation request --- src/asr.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/asr.c b/src/asr.c index 3d5aada..3d6ea05 100644 --- a/src/asr.c +++ b/src/asr.c @@ -28,8 +28,12 @@ #include "asr.h" #include "idevicerestore.h" +#define ASR_VERSION 1 +#define ASR_STREAM_ID 1 #define ASR_PORT 12345 #define ASR_BUFFER_SIZE 65536 +#define ASR_FEC_SLICE_STRIDE 40 +#define ASR_PACKETS_PER_FEC 25 #define ASR_PAYLOAD_PACKET_SIZE 1450 #define ASR_CHECKSUM_CHUNK_SIZE 131072 @@ -204,12 +208,12 @@ int asr_perform_validation(asr_client_t asr, const char* filesystem) { if (asr->checksum_chunks) { plist_dict_insert_item(packet_info, "Checksum Chunk Size", plist_new_uint(ASR_CHECKSUM_CHUNK_SIZE)); } - plist_dict_insert_item(packet_info, "FEC Slice Stride", plist_new_uint(40)); + plist_dict_insert_item(packet_info, "FEC Slice Stride", plist_new_uint(ASR_FEC_SLICE_STRIDE)); plist_dict_insert_item(packet_info, "Packet Payload Size", plist_new_uint(ASR_PAYLOAD_PACKET_SIZE)); - plist_dict_insert_item(packet_info, "Packets Per FEC", plist_new_uint(25)); + plist_dict_insert_item(packet_info, "Packets Per FEC", plist_new_uint(ASR_PACKETS_PER_FEC)); plist_dict_insert_item(packet_info, "Payload", payload_info); - plist_dict_insert_item(packet_info, "Stream ID", plist_new_uint(1)); - plist_dict_insert_item(packet_info, "Version", plist_new_uint(1)); + plist_dict_insert_item(packet_info, "Stream ID", plist_new_uint(ASR_STREAM_ID)); + plist_dict_insert_item(packet_info, "Version", plist_new_uint(ASR_VERSION)); if (asr_send(asr, packet_info)) { error("ERROR: Unable to sent packet information to ASR\n"); -- cgit v1.1-32-gdbae