4 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: JuHak Park <juhaki.park@samsung.com>,
7 * JuneHyuk Lee <junhyuk7.lee@samsung.com>,
8 * SunBong Ha <sunbong.ha@samsung.com>
10 * Licensed under the Apache License, Version 2.0 (the "License");
11 * you may not use this file except in compliance with the License.
12 * You may obtain a copy of the License at
14 * http://www.apache.org/licenses/LICENSE-2.0
16 * Unless required by applicable law or agreed to in writing, software
17 * distributed under the License is distributed on an "AS IS" BASIS,
18 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 * See the License for the specific language governing permissions and
20 * limitations under the License.
28 * For any sort of issue you concern as to this software,
29 * you may use following point of contact.
30 * All resources contributed on this software
31 * are orinigally written by S-Core Inc., a member of Samsung Group.
33 * SeongWon Shim <seongwon.shim@samsung.com>
39 * @brief This file is the source file of implementation of functions which saves and gets sync results
43 #include "agent-framework/DACI/DACI_Agent_Handler_Manager.h"
44 #include "agent-framework/Utility/fw_log.h"
45 #include "Common/Common_Util.h"
46 #include "ServiceEngine/SE_Storage.h"
47 #include "ServiceEngine/SE_Common.h"
49 #define LOG_TAG "OMA_DS_SE"
51 static SE_ErrorType __write_sync_type(int accountId, AlertType alertType);
52 static SE_ErrorType __write_last_session_values(int accountId, SyncSessionResult syncSessionResult, int lastSessionTime);
54 static SE_ErrorType __write_sync_type(int accountId, AlertType alertType)
58 SE_ErrorType err = SE_INTERNAL_OK;
61 char *syncType = NULL;
64 syncType = DEFINE_ALERT_SLOW_SYNC_STR;
67 syncType = DEFINE_ALERT_TWO_WAY_STR;
69 case ALERT_ONE_WAY_FROM_CLIENT:
70 syncType = DEFINE_ALERT_ONE_WAY_FROM_CLIENT_STR;
72 case ALERT_ONE_WAY_FROM_SERVER:
73 syncType = DEFINE_ALERT_ONE_WAY_FROM_SERVER_STR;
75 case ALERT_REFRESH_FROM_SERVER:
76 syncType = DEFINE_ALERT_REFRESH_FROM_SERVER_STR;
78 case ALERT_REFRESH_FROM_CLIENT:
79 syncType = DEFINE_ALERT_REFRESH_FROM_CLIENT_STR;
85 result = set_config_str(accountId, DEFINE_CONFIG_KEY_PROFILE_SYNC_TYPE, syncType, "string", "SE");
86 if (result == false) {
87 FW_LOGE("failed in set_Config");
88 err = SE_INTERNAL_DA_ERROR;
101 static SE_ErrorType __write_last_session_values(int accountId, SyncSessionResult syncSessionResult, int lastSessionTime)
105 SE_ErrorType err = SE_INTERNAL_OK;
108 result = set_config_int(accountId, DEFINE_CONFIG_KEY_PROFILE_LAST_SESSION_STATUS, syncSessionResult, "int", "SE");
109 if (result == false) {
110 FW_LOGE("failed in set_config");
111 err = SE_INTERNAL_DA_ERROR;
115 result = set_config_int(accountId, DEFINE_CONFIG_KEY_PROFILE_LAST_SESSION_TIME, lastSessionTime, "int", "SE");
116 if (result == false) {
117 FW_LOGE("failed in set_config");
118 err = SE_INTERNAL_DA_ERROR;
129 SE_ErrorType write_profile_data(int accountId, AlertType alertType, SyncSessionResult syncSessionResult, int lastSessionTime)
133 SE_ErrorType err = SE_INTERNAL_OK;
135 err = __write_sync_type(accountId, alertType);
136 if (err != SE_INTERNAL_OK) {
137 FW_LOGE("failed in writeSyncType");
141 err = __write_last_session_values(accountId, syncSessionResult, lastSessionTime);
142 if (err != SE_INTERNAL_OK) {
143 FW_LOGE("failed in writeLastSessionValues");
148 for (content_type = 0; content_type < TYPE_CONTENT_COUNT; content_type++) {
149 if (datastoreinfo_per_content_type[content_type]->clientSyncType) {
150 err = write_sync_resource_info(accountId, alertType, content_type , lastSessionTime,
151 datastoreinfo_per_content_type[content_type]->clientSyncResult, datastoreinfo_per_content_type[content_type]->serverSyncResult);
152 if (err != SE_INTERNAL_OK) {
153 FW_LOGE("failed in writeSyncResourceInfo");
157 err = write_sync_statistics(accountId, content_type, false, datastoreinfo_per_content_type[content_type]->clientSyncResult);
158 if (err != SE_INTERNAL_OK) {
159 FW_LOGE("failed in writeSyncStatistics");
163 err = write_sync_statistics(accountId, content_type, true, datastoreinfo_per_content_type[content_type]->serverSyncResult);
164 if (err != SE_INTERNAL_OK) {
165 FW_LOGE("failed in writeSyncStatistics");
177 SE_ErrorType write_sync_statistics(int accountId, int content_type, bool isFromServer, SyncResult *pSyncResult)
181 SE_ErrorType err = SE_INTERNAL_OK;
184 char *datastore = NULL;
186 char numberOfChangesPath[128];
187 char addCountPath[128];
188 char replaceCountPath[128];
189 char deleteCountPath[128];
191 if (content_type == TYPE_CONTACT)
192 datastore = DEFINE_CONFIG_KEY_PROFILE_CATEGORY_CONTACTS;
193 else if (content_type == TYPE_CALENDAR)
194 datastore = DEFINE_CONFIG_KEY_PROFILE_CATEGORY_CALENDAR;
195 else if (content_type == TYPE_MEMO)
196 datastore = DEFINE_CONFIG_KEY_PROFILE_CATEGORY_MEMO;
197 else if (content_type == TYPE_CALLLOG)
198 datastore = DEFINE_CONFIG_KEY_PROFILE_CATEGORY_CALLLOG;
200 if (isFromServer == true)
201 side = DEFINE_CONFIG_KEY_PROFILE_STATISTICS_SERVER;
203 side = DEFINE_CONFIG_KEY_PROFILE_STATISTICS_CLIENT;
205 FW_LOGV("pSyncResult->numberOfChange = %d", pSyncResult->numberOfChange);
206 FW_LOGV("pSyncResult->add_count = %d", pSyncResult->add_count);
207 FW_LOGV("pSyncResult->replace_count = %d", pSyncResult->replace_count);
208 FW_LOGV("pSyncResult->delete_count = %d", pSyncResult->delete_count);
210 sprintf(numberOfChangesPath, "%s_%s_%s", datastore, side, DEFINE_CONFIG_KEY_PROFILE_STATISTICS_TOTAL);
211 sprintf(addCountPath, "%s_%s_%s", datastore, side, DEFINE_CONFIG_KEY_PROFILE_STATISTICS_NROFADD);
212 sprintf(replaceCountPath, "%s_%s_%s", datastore, side, DEFINE_CONFIG_KEY_PROFILE_STATISTICS_NROFREPLACE);
213 sprintf(deleteCountPath, "%s_%s_%s", datastore, side, DEFINE_CONFIG_KEY_PROFILE_STATISTICS_NROFDELETE);
215 result = set_config_int(accountId, numberOfChangesPath, pSyncResult->numberOfChange, "int", "SE");
216 if (result == false) {
217 FW_LOGE("failed in set_config");
218 err = SE_INTERNAL_DA_ERROR;
222 result = set_config_int(accountId, addCountPath, pSyncResult->add_count, "int", "SE");
223 if (result == false) {
224 FW_LOGE("failed in set_config");
225 err = SE_INTERNAL_DA_ERROR;
229 result = set_config_int(accountId, replaceCountPath, pSyncResult->replace_count, "int", "SE");
230 if (result == false) {
231 FW_LOGE("failed in set_config");
232 err = SE_INTERNAL_DA_ERROR;
236 result = set_config_int(accountId, deleteCountPath, pSyncResult->delete_count, "int", "SE");
237 if (result == false) {
238 FW_LOGE("failed in set_config");
239 err = SE_INTERNAL_DA_ERROR;
251 SE_ErrorType write_sync_resource_info(int accountId, AlertType alertType, int content_type , int lastSessionTime,
252 SyncResult *clientSyncResult, SyncResult *serverSyncResult)
256 SE_ErrorType err = SE_INTERNAL_OK;
258 char *datastore = NULL;
259 char dbSyncedPath[128];
260 char lastSessionTimePath[128];
262 if (content_type == TYPE_CONTACT)
263 datastore = DEFINE_CONFIG_KEY_PROFILE_CATEGORY_CONTACTS;
264 else if (content_type == TYPE_CALENDAR)
265 datastore = DEFINE_CONFIG_KEY_PROFILE_CATEGORY_CALENDAR;
266 else if (content_type == TYPE_MEMO)
267 datastore = DEFINE_CONFIG_KEY_PROFILE_CATEGORY_MEMO;
268 else if (content_type == TYPE_CALLLOG)
269 datastore = DEFINE_CONFIG_KEY_PROFILE_CATEGORY_CALLLOG;
271 FW_LOGV("clientSyncResult->sessionResult = %d", clientSyncResult->sessionResult);
272 FW_LOGV("serverSyncResult->sessionResult = %d", serverSyncResult->sessionResult);
275 if (clientSyncResult->sessionResult == SYNC_SESSION_SUCCEEDED &&
276 (serverSyncResult->sessionResult == SYNC_SESSION_SUCCEEDED || alertType == ALERT_ONE_WAY_FROM_CLIENT || alertType == ALERT_REFRESH_FROM_CLIENT))
277 dbSynced = DEFINE_DBSYNC_SUCCESS;
278 else if (clientSyncResult->sessionResult == SYNC_SESSION_STOPPED)
279 dbSynced = DEFINE_DBSYNC_STOP;
281 dbSynced = DEFINE_DBSYNC_FAIL;
283 FW_LOGV("dbSynced = %s", dbSynced);
285 sprintf(dbSyncedPath, "%s_%s", datastore, DEFINE_CONFIG_KEY_PROFILE_STATISTICS_DBSYNCED);
286 sprintf(lastSessionTimePath, "%s_%s", datastore, DEFINE_CONFIG_KEY_PROFILE_STATISTICS_LAST_TIME);
288 result = set_config_str(accountId, dbSyncedPath, dbSynced, "string", "SE");
289 if (result == false) {
290 FW_LOGE("failed in set_config");
291 err = SE_INTERNAL_DA_ERROR;
295 result = set_config_int(accountId, lastSessionTimePath, lastSessionTime, "int", "SE");
296 if (result == false) {
297 FW_LOGE("failed in set_config");
298 err = SE_INTERNAL_DA_ERROR;
309 bool get_profile_name(int accountId, char **profileName)
313 SE_ErrorType err = SE_INTERNAL_OK;
316 DACI_RETURN da_err = DACI_Open_Agent();
317 if (da_err != DACI_SUCCESS) {
318 err = SE_INTERNAL_DA_ERROR;
322 result = get_config(accountId, DEFINE_CONFIG_KEY_PROFILE_NAME, profileName);
323 if (result == false) {
324 FW_LOGE("failed in get_Config");
325 err = SE_INTERNAL_DA_ERROR;
335 if (err != SE_INTERNAL_OK)
341 bool get_profile_server_info(int accountId, char **addr, char **id, char **password)
345 SE_ErrorType err = SE_INTERNAL_OK;
348 DACI_RETURN da_err = DACI_Open_Agent();
349 if (da_err != DACI_SUCCESS) {
350 err = SE_INTERNAL_DA_ERROR;
354 result = get_config(accountId, DEFINE_CONFIG_KEY_PROFILE_SERVER_IP, addr);
355 if (result == false) {
356 FW_LOGE("failed in get_Config");
357 err = SE_INTERNAL_DA_ERROR;
361 *id = DACI_Get_Account_Email_Address(accountId);
363 err = SE_INTERNAL_DA_ERROR;
367 *password = DACI_Get_Account_Password(accountId);
368 if (*password == NULL) {
369 err = SE_INTERNAL_DA_ERROR;
379 if (err != SE_INTERNAL_OK)
385 bool get_profile_sync_mode(int accountId, char **syncMode, char **syncType, char **interval)
389 SE_ErrorType err = SE_INTERNAL_OK;
391 char *tempSyncType = NULL;
393 DACI_RETURN da_err = DACI_Open_Agent();
394 if (da_err != DACI_SUCCESS) {
395 err = SE_INTERNAL_DA_ERROR;
399 result = get_config(accountId, DEFINE_CONFIG_KEY_PROFILE_SYNC_MODE, syncMode);
400 if (result == false) {
401 FW_LOGE("failed in get_Config");
402 err = SE_INTERNAL_DA_ERROR;
406 result = get_config(accountId, DEFINE_CONFIG_KEY_PROFILE_SYNC_TYPE, syncType);
407 if (result == false) {
408 FW_LOGE("failed in get_Config");
409 err = SE_INTERNAL_DA_ERROR;
413 result = get_config(accountId, DEFINE_CONFIG_KEY_PROFILE_SYNC_INTERVAL, interval);
414 if (result == false) {
415 FW_LOGE("failed in get_Config");
416 err = SE_INTERNAL_DA_ERROR;
426 if (tempSyncType != NULL)
429 if (err != SE_INTERNAL_OK)
435 bool get_profile_sync_category(int accountId, int contentType, int *enabled, char **srcURI, char **tgtURI, char **id, char **password)
439 SE_ErrorType err = SE_INTERNAL_OK;
441 char *datastore = NULL;
442 char *enabled_str = NULL;
444 char datastore_source[128];
445 char datastore_target[128];
446 char datastore_id[128];
447 char datastore_pw[128];
449 DACI_RETURN da_err = DACI_Open_Agent();
450 if (da_err != DACI_SUCCESS) {
451 err = SE_INTERNAL_DA_ERROR;
455 if (contentType == TYPE_CONTACT)
456 datastore = DEFINE_CONFIG_KEY_PROFILE_CATEGORY_CONTACTS;
457 else if (contentType == TYPE_CALENDAR)
458 datastore = DEFINE_CONFIG_KEY_PROFILE_CATEGORY_CALENDAR;
459 else if (contentType == TYPE_MEMO)
460 datastore = DEFINE_CONFIG_KEY_PROFILE_CATEGORY_MEMO;
461 else if (contentType == TYPE_CALLLOG)
462 datastore = DEFINE_CONFIG_KEY_PROFILE_CATEGORY_CALLLOG;
464 result = get_config(accountId, datastore, &enabled_str);
465 if (result == false) {
466 FW_LOGE("failed in get_Config");
467 err = SE_INTERNAL_DA_ERROR;
470 *enabled = atoi(enabled_str);
472 sprintf(datastore_source, "%s_%s", datastore, DEFINE_CONFIG_KEY_PROFILE_CATEGORY_SOURCE);
473 sprintf(datastore_target, "%s_%s", datastore, DEFINE_CONFIG_KEY_PROFILE_CATEGORY_TARGET);
474 sprintf(datastore_id, "%s_%s", datastore, DEFINE_CONFIG_KEY_PROFILE_CATEGORY_ID);
475 sprintf(datastore_pw, "%s_%s", datastore, DEFINE_CONFIG_KEY_PROFILE_CATEGORY_PASSWORD);
477 result = get_config(accountId, datastore_source, srcURI);
478 if (result == false) {
479 FW_LOGE("failed in get_Config");
480 err = SE_INTERNAL_DA_ERROR;
484 result = get_config(accountId, datastore_target, tgtURI);
485 if (result == false) {
486 FW_LOGE("failed in get_Config");
487 err = SE_INTERNAL_DA_ERROR;
491 result = get_config(accountId, datastore_id, id);
492 if (result == false) {
493 FW_LOGE("failed in get_Config");
494 err = SE_INTERNAL_DA_ERROR;
498 result = get_config(accountId, datastore_pw, password);
499 if (result == false) {
500 FW_LOGE("failed in get_Config");
501 err = SE_INTERNAL_DA_ERROR;
511 if (enabled_str != NULL)
514 if (err != SE_INTERNAL_OK)
521 bool get_last_session_info(int accountId, int *lastSessionStatus, int *lastSessionTime)
525 SE_ErrorType err = SE_INTERNAL_OK;
527 char *lastSessionStatus_str = NULL;
528 char *lastSessionTime_str = NULL;
530 DACI_RETURN da_err = DACI_Open_Agent();
531 if (da_err != DACI_SUCCESS) {
532 err = SE_INTERNAL_DA_ERROR;
536 result = get_config(accountId, DEFINE_CONFIG_KEY_PROFILE_LAST_SESSION_STATUS, &lastSessionStatus_str);
537 if (result == false) {
538 FW_LOGE("failed in get_Config");
539 err = SE_INTERNAL_DA_ERROR;
543 result = get_config(accountId, DEFINE_CONFIG_KEY_PROFILE_LAST_SESSION_TIME, &lastSessionTime_str);
544 if (result == false) {
545 FW_LOGE("failed in get_Config");
546 err = SE_INTERNAL_DA_ERROR;
550 *lastSessionStatus = atoi(lastSessionStatus_str);
551 *lastSessionTime = atoi(lastSessionTime_str);
559 if (lastSessionStatus_str != NULL)
560 free(lastSessionStatus_str);
562 if (lastSessionTime_str != NULL)
563 free(lastSessionTime_str);
565 if (err != SE_INTERNAL_OK)
571 bool get_profile_statistics(int accountId, int contentType, char **dbSynced, int *lastSessionTime,
572 int *server2Client_Total, int *server2Client_NrOfAdd, int *server2Client_NrOfDelete, int *server2Client_NrOfReplace,
573 int *client2Server_Total, int *client2Server_NrOfAdd, int *client2Server_NrOfDelete, int *client2Server_NrOfReplace)
577 SE_ErrorType err = SE_INTERNAL_OK;
580 char *datastore = NULL;
581 char datastore_dbsynced[128];
582 char datastore_lastsessiontime[128];
583 char datastore_s2c_total[128];
584 char datastore_s2c_add[128];
585 char datastore_s2c_replace[128];
586 char datastore_s2c_delete[128];
587 char datastore_c2s_total[128];
588 char datastore_c2s_add[128];
589 char datastore_c2s_replace[128];
590 char datastore_c2s_delete[128];
592 char *lastSessionTime_str = NULL;
593 char *server2Client_Total_str = NULL;
594 char *server2Client_NrOfAdd_str = NULL;
595 char *server2Client_NrOfDelete_str = NULL;
596 char *server2Client_NrOfReplace_str = NULL;
597 char *client2Server_Total_str = NULL;
598 char *client2Server_NrOfAdd_str = NULL;
599 char *client2Server_NrOfDelete_str = NULL;
600 char *client2Server_NrOfReplace_str = NULL;
602 DACI_RETURN da_err = DACI_Open_Agent();
603 if (da_err != DACI_SUCCESS) {
604 err = SE_INTERNAL_DA_ERROR;
608 if (contentType == TYPE_CONTACT)
609 datastore = DEFINE_CONFIG_KEY_PROFILE_CATEGORY_CONTACTS;
610 else if (contentType == TYPE_CALENDAR)
611 datastore = DEFINE_CONFIG_KEY_PROFILE_CATEGORY_CALENDAR;
612 else if (contentType == TYPE_MEMO)
613 datastore = DEFINE_CONFIG_KEY_PROFILE_CATEGORY_MEMO;
614 else if (contentType == TYPE_CALLLOG)
615 datastore = DEFINE_CONFIG_KEY_PROFILE_CATEGORY_CALLLOG;
617 sprintf(datastore_dbsynced, "%s_%s", datastore, DEFINE_CONFIG_KEY_PROFILE_STATISTICS_DBSYNCED);
618 sprintf(datastore_lastsessiontime, "%s_%s", datastore, DEFINE_CONFIG_KEY_PROFILE_STATISTICS_LAST_TIME);
619 sprintf(datastore_s2c_total, "%s_%s_%s", datastore, DEFINE_CONFIG_KEY_PROFILE_STATISTICS_SERVER, DEFINE_CONFIG_KEY_PROFILE_STATISTICS_TOTAL);
620 sprintf(datastore_s2c_add, "%s_%s_%s", datastore, DEFINE_CONFIG_KEY_PROFILE_STATISTICS_SERVER, DEFINE_CONFIG_KEY_PROFILE_STATISTICS_NROFADD);
621 sprintf(datastore_s2c_delete, "%s_%s_%s", datastore, DEFINE_CONFIG_KEY_PROFILE_STATISTICS_SERVER, DEFINE_CONFIG_KEY_PROFILE_STATISTICS_NROFDELETE);
622 sprintf(datastore_s2c_replace, "%s_%s_%s", datastore, DEFINE_CONFIG_KEY_PROFILE_STATISTICS_SERVER, DEFINE_CONFIG_KEY_PROFILE_STATISTICS_NROFREPLACE);
625 sprintf(datastore_c2s_total, "%s_%s_%s", datastore, DEFINE_CONFIG_KEY_PROFILE_STATISTICS_CLIENT, DEFINE_CONFIG_KEY_PROFILE_STATISTICS_TOTAL);
626 sprintf(datastore_c2s_add, "%s_%s_%s", datastore, DEFINE_CONFIG_KEY_PROFILE_STATISTICS_CLIENT, DEFINE_CONFIG_KEY_PROFILE_STATISTICS_NROFADD);
627 sprintf(datastore_c2s_delete, "%s_%s_%s", datastore, DEFINE_CONFIG_KEY_PROFILE_STATISTICS_CLIENT, DEFINE_CONFIG_KEY_PROFILE_STATISTICS_NROFDELETE);
628 sprintf(datastore_c2s_replace, "%s_%s_%s", datastore, DEFINE_CONFIG_KEY_PROFILE_STATISTICS_CLIENT, DEFINE_CONFIG_KEY_PROFILE_STATISTICS_NROFREPLACE);
630 result = get_config(accountId, datastore_dbsynced, dbSynced);
631 if (result == false) {
632 FW_LOGE("failed in get_Config");
633 err = SE_INTERNAL_DA_ERROR;
637 result = get_config(accountId, datastore_lastsessiontime, &lastSessionTime_str);
638 if (result == false) {
639 FW_LOGE("failed in get_Config");
640 err = SE_INTERNAL_DA_ERROR;
643 *lastSessionTime = atoi(lastSessionTime_str);
645 result = get_config(accountId, datastore_s2c_total, &server2Client_Total_str);
646 if (result == false) {
647 FW_LOGE("failed in get_Config");
648 err = SE_INTERNAL_DA_ERROR;
651 *server2Client_Total = atoi(server2Client_Total_str);
653 result = get_config(accountId, datastore_s2c_add, &server2Client_NrOfAdd_str);
654 if (result == false) {
655 FW_LOGE("failed in get_Config");
656 err = SE_INTERNAL_DA_ERROR;
659 *server2Client_NrOfAdd = atoi(server2Client_NrOfAdd_str);
661 result = get_config(accountId, datastore_s2c_delete, &server2Client_NrOfDelete_str);
662 if (result == false) {
663 FW_LOGE("failed in get_Config");
664 err = SE_INTERNAL_DA_ERROR;
667 *server2Client_NrOfDelete = atoi(server2Client_NrOfDelete_str);
669 result = get_config(accountId, datastore_s2c_replace, &server2Client_NrOfReplace_str);
670 if (result == false) {
671 FW_LOGE("failed in get_Config");
672 err = SE_INTERNAL_DA_ERROR;
675 *server2Client_NrOfReplace = atoi(server2Client_NrOfReplace_str);
677 result = get_config(accountId, datastore_c2s_total, &client2Server_Total_str);
678 if (result == false) {
679 FW_LOGE("failed in get_Config");
680 err = SE_INTERNAL_DA_ERROR;
683 *client2Server_Total = atoi(client2Server_Total_str);
685 result = get_config(accountId, datastore_c2s_add, &client2Server_NrOfAdd_str);
686 if (result == false) {
687 FW_LOGE("failed in get_Config");
688 err = SE_INTERNAL_DA_ERROR;
691 *client2Server_NrOfAdd = atoi(client2Server_NrOfAdd_str);
693 result = get_config(accountId, datastore_c2s_delete, &client2Server_NrOfDelete_str);
694 if (result == false) {
695 FW_LOGE("failed in get_Config");
696 err = SE_INTERNAL_DA_ERROR;
699 *client2Server_NrOfDelete = atoi(client2Server_NrOfDelete_str);
701 result = get_config(accountId, datastore_c2s_replace, &client2Server_NrOfReplace_str);
702 if (result == false) {
703 FW_LOGE("failed in get_Config");
704 err = SE_INTERNAL_DA_ERROR;
707 *client2Server_NrOfReplace = atoi(client2Server_NrOfReplace_str);
715 if (lastSessionTime_str != NULL)
716 free(lastSessionTime_str);
718 if (server2Client_Total_str != NULL)
719 free(server2Client_Total_str);
721 if (server2Client_NrOfAdd_str != NULL)
722 free(server2Client_NrOfAdd_str);
724 if (server2Client_NrOfDelete_str != NULL)
725 free(server2Client_NrOfDelete_str);
727 if (server2Client_NrOfReplace_str != NULL)
728 free(server2Client_NrOfReplace_str);
730 if (client2Server_Total_str != NULL)
731 free(client2Server_Total_str);
733 if (client2Server_NrOfAdd_str != NULL)
734 free(client2Server_NrOfAdd_str);
736 if (client2Server_NrOfDelete_str != NULL)
737 free(client2Server_NrOfDelete_str);
739 if (client2Server_NrOfReplace_str != NULL)
740 free(client2Server_NrOfReplace_str);
742 if (err != SE_INTERNAL_OK)