/*
-* Copyright 2012 Samsung Electronics Co., Ltd
+* Copyright 2012-2013 Samsung Electronics Co., Ltd
*
* Licensed under the Flora License, Version 1.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
-* http://www.tizenopensource.org/license
+* http://floralicense.org
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
#include "MsgCppTypes.h"
#include "MsgException.h"
#include "MsgGconfWrapper.h"
-#include "MsgUtilFile.h"
#include "SmsPluginTpduCodec.h"
#include "SmsPluginParamCodec.h"
{
int offset = 0, udLen = 0;
-#if 1
- char temp[2048];
- char tempcat[100];
- memset(temp, 0x00, sizeof(temp));
- memset(tempcat, 0x00, sizeof(tempcat));
- time_t rawtime;
- time ( &rawtime );
-
- sprintf(temp, "[MT] %s", ctime(&rawtime));
-
- for (int i = 0; i < TpduLen; i++)
- {
- sprintf(tempcat, "[%02x]\n", pTpdu[i]);
- strncat(temp, tempcat, sizeof(temp)-strlen(temp)-1);
- memset(tempcat, 0x00, sizeof(tempcat));
- }
-
-
- sprintf(tempcat, "\n\n\n");
- strncat(temp, tempcat, sizeof(temp)-strlen(temp)-1);
+ char tpduTmp[(TpduLen*2)+1];
+ memset(tpduTmp, 0x00, sizeof(tpduTmp));
+ for (int i = 0; i < TpduLen; i++) {
+ snprintf(tpduTmp+(i*2), sizeof(tpduTmp)-(i*2), "%02X", pTpdu[i]);
+ }
+ MSG_DEBUG("Deliver TPDU.");
+ MSG_DEBUG("[%s]", tpduTmp);
- //MsgOpenCreateAndOverwriteFile(TPDU_LOG_FILE, temp, strlen(temp));
- FILE* pFile=NULL ;
- pFile = MsgOpenFile(TPDU_LOG_FILE, "a");
- MsgWriteFile(temp, sizeof(char), strlen(temp), pFile);
- MsgFflush(pFile);
- MsgCloseFile(pFile);
-#endif
// TP-MMS
if (pTpdu[offset] & 0x04)
pDeliver->bMoreMsg = false;