📄 capisms.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 "capisms.h"
#include "cmmnrsrc.h"
#include "ml_typw.h"
#include "wap.ifc"
#if defined LOG_EXTERNAL
#include "aapiclnt.h"
#endif
EXPORT_C VOID SMSc_sentRequest (VOID)
{
XMK_SEND_TMP_VARS
#if defined LOG_EXTERNAL
{
CLNTa_log(0, 0, "SMSc_sentRequest\nVOID\n");
}
#endif
XMK_SEND_ENV( ENV,
SMSsentInd,
xDefaultPrioSignal,
0,
NULL,
GLOBALPID(XPTID_Segmentation,0));
}
EXPORT_C VOID SMSc_receivedRequest (const CHAR *source, UINT8 sourceLength, const CHAR *data, UINT8 dataLength)
{
XMK_SEND_TMP_VARS
yPDef_RecSMSDatagram var;
CHAR *pCHAR;
#if defined LOG_EXTERNAL
{
const char *_source, *_data;
char *strSource;
char *strData;
_data = strData = OctetString2HexString(data, dataLength);
_source = strSource = OctetString2HexString(source, sourceLength);
if (!_data)
{
_data = cszNULL;
}
if (!_source)
{
_source = cszNULL;
}
CLNTa_log(0, 0, "SMSc_receivedRequest\nconst CHAR * \t source \t %s\nUINT8 \t sourceLength \t %u\nconst CHAR * \t data \t %s\nUINT8 \t dataLength \t %u\n", _source, (int)sourceLength, _data, (int)dataLength);
OSConnectorFree(strSource);
OSConnectorFree(strData);
}
#endif
pCHAR = NULL;
if (sourceLength)
{
if (source)
{
pCHAR = (CHAR*)OSConnectorAlloc(sourceLength);
if (!pCHAR)
return;
memcpy(pCHAR, source, sourceLength);
}
else
{
sourceLength = 0;
}
}
devaddr_store(&(var.Param3), pCHAR, sourceLength);
pCHAR = NULL;
if (dataLength)
{
if (data)
{
pCHAR = (CHAR*)OSConnectorAlloc(dataLength);
if (!pCHAR)
return;
memcpy(pCHAR, data, dataLength);
}
else
{
dataLength = 0;
}
}
var.Param1 = pCHAR;
var.Param2 = dataLength;
XMK_SEND_ENV( ENV,
RecSMSDatagram,
xDefaultPrioSignal,
sizeof( yPDef_RecSMSDatagram ),
&var,
GLOBALPID(XPTID_Reassemble,0));
}
EXPORT_C VOID SMSc_receivedError (UINT8 message)
{
XMK_SEND_TMP_VARS
yPDef_SMSErrorInd var;
#if defined LOG_EXTERNAL
{
CLNTa_log(0, 0, "SMSc_receivedError\nUINT8 \t message \t %u\n", message);
}
#endif
var.Param1 = message;
XMK_SEND_ENV( ENV,
SMSErrorInd,
xDefaultPrioSignal,
sizeof( yPDef_SMSErrorInd ),
&var,
GLOBALPID(XPTID_Segmentation,0));
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -