📄 wap_wd.c
字号:
/*
* Copyright (C) Ericsson Mobile Communications AB, 2000.
* Licensed to AU-System AB.
* All rights reserved.
*
* This software is covered by the license agreement between
* the end user and AU-System AB, and may be used and copied
* only in accordance with the terms of the said agreement.
*
* Neither Ericsson Mobile Communications AB nor AU-System AB
* assumes any responsibility or liability for any errors or inaccuracies in
* this software, or any consequential, incidental or indirect damage arising
* out of the use of the Generic WAP Client software.
*/
#include "wiptrgt.h"
#include "aapiwd.h"
#include "cmmnrsrc.h"
#ifdef LOG_EXTERNAL
#include "aapiclnt.h"
#endif
#ifndef CBASIC_WITH_NO_CONNECTORS
#include "capiwd.h"
#endif
/*
Exported from UDP.
*/
extern const size_t cHeaderUDP;
CHAR * responseUDP(const size_t, const size_t, const CHAR *, size_t *);
CHAR * responseOnceDeck1(size_t *);
VOID WDa_sendRequest (const CHAR *data, UINT16 dataLength, UINT16 destinationPort, UINT16 sourcePort)
{
#ifdef LOG_EXTERNAL
{
char *strData = OctetString2HexString(data, dataLength);
CLNTa_log(0, 0, "WDa_sendRequest\nconst CHAR * \t data \t %s\nUINT16 \t dataLength \t %uUINT16 \t destinationPort \t %u\nUINT16 \t sourcePort \t %u", strData, (int)dataLength, (int)destinationPort, (int)sourcePort);
OSConnectorFree(strData);
}
#endif
#ifndef CBASIC_WITH_NO_CONNECTORS
/* RETURN */
/* DECK 1 */
{
size_t len;
CHAR *response;
response = responseOnceDeck1(&len);
*response = data[0]; /* TId */
WDc_receivedRequest(response, (INT16)len, sourcePort, destinationPort);
OSConnectorFree(response);
}
#endif
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -