2011-03-25 09:38:07 +00:00
|
|
|
/*
|
Fix issue 162, issue 163, issue 164, issue 165, issue 166, issue 168, issue 170, issue 172, issue 173, issue 174, issue 176, issue 180.
2013-01-10 12:39:34 +00:00
|
|
|
* Copyright (C) 2010-2011 Mamadou Diop
|
|
|
|
* Copyright (C) 2011-2013 Doubango Telecom <http://www.doubango.org>
|
2016-02-23 21:00:35 +00:00
|
|
|
*
|
2011-03-25 09:38:07 +00:00
|
|
|
* This file is part of Open Source Doubango Framework.
|
|
|
|
*
|
|
|
|
* DOUBANGO is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
2016-02-23 21:00:35 +00:00
|
|
|
*
|
2011-03-25 09:38:07 +00:00
|
|
|
* DOUBANGO is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
2016-02-23 21:00:35 +00:00
|
|
|
*
|
2011-03-25 09:38:07 +00:00
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with DOUBANGO.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**@file tcomp_udvm.nack.c
|
|
|
|
* @brief SigComp UDVM machine (NACK).
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
#include "tcomp_udvm.h"
|
|
|
|
|
Fix issue 162, issue 163, issue 164, issue 165, issue 166, issue 168, issue 170, issue 172, issue 173, issue 174, issue 176, issue 180.
2013-01-10 12:39:34 +00:00
|
|
|
#include "tsk_debug.h"
|
2011-03-25 09:38:07 +00:00
|
|
|
|
Fix issue 162, issue 163, issue 164, issue 165, issue 166, issue 168, issue 170, issue 172, issue 173, issue 174, issue 176, issue 180.
2013-01-10 12:39:34 +00:00
|
|
|
int tcomp_udvm_createNackInfo(tcomp_udvm_t *udvm, uint8_t reasonCode, tcomp_buffer_handle_t* lpDetails, int16_t memory_address_of_instruction)
|
2011-03-25 09:38:07 +00:00
|
|
|
{
|
2016-02-23 21:00:35 +00:00
|
|
|
uint32_t mem_add_instruction;
|
|
|
|
int ret;
|
|
|
|
|
|
|
|
if(!udvm) {
|
|
|
|
TSK_DEBUG_ERROR("Invalid parameter");
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
|
|
|
tcomp_buffer_allocBuff(udvm->lpResult->nack_info, INDEX_NACK_SHA1 + TSK_SHA1_DIGEST_SIZE);
|
|
|
|
mem_add_instruction = (memory_address_of_instruction >=0) ? memory_address_of_instruction : udvm->last_memory_address_of_instruction;
|
Fix issue 162, issue 163, issue 164, issue 165, issue 166, issue 168, issue 170, issue 172, issue 173, issue 174, issue 176, issue 180.
2013-01-10 12:39:34 +00:00
|
|
|
|
2016-02-23 21:00:35 +00:00
|
|
|
if((ret = tcomp_nackinfo_write_2(udvm->lpResult->nack_info,
|
|
|
|
reasonCode,
|
|
|
|
*TCOMP_UDVM_GET_BUFFER_AT(mem_add_instruction),
|
|
|
|
mem_add_instruction,
|
|
|
|
udvm->sigCompMessage,
|
|
|
|
lpDetails,
|
|
|
|
TCOMP_UDVM_GET_SIZE(),
|
|
|
|
udvm->stateHandler->sigcomp_parameters->cpbValue)) == 0) {
|
|
|
|
udvm->lpResult->isNack = 1;
|
|
|
|
}
|
Fix issue 162, issue 163, issue 164, issue 165, issue 166, issue 168, issue 170, issue 172, issue 173, issue 174, issue 176, issue 180.
2013-01-10 12:39:34 +00:00
|
|
|
|
2016-02-23 21:00:35 +00:00
|
|
|
return ret;
|
Fix issue 162, issue 163, issue 164, issue 165, issue 166, issue 168, issue 170, issue 172, issue 173, issue 174, issue 176, issue 180.
2013-01-10 12:39:34 +00:00
|
|
|
}
|