blob: 78ae2987cd2ea3751a6dd290c1fb7ab94c6c8f87 [file] [log] [blame]
xf.li742dd022023-06-08 01:43:32 -07001/**
2 * @file sc_absvr.c
3 * @brief Implementation of sc_absvr.
4 *
5 * Copyright (C) 2023 Sanechips Technology Co., Ltd.
lh758261d2023-07-13 05:52:04 -07006 * @author
7 *
xf.li742dd022023-06-08 01:43:32 -07008 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation. £¨±ØÑ¡£ºGPLv2 Licence£©
11 *
12 */
13
14
15/*******************************************************************************
16 * Include header files *
17 ******************************************************************************/
18#include <stdio.h>
19#include <string.h>
20#include <stdlib.h>
21#include <assert.h>
22#include <syslog.h>
23#include <sys/klog.h>
24#include <sys/msg.h>
25#include <sys/un.h>
26#include <errno.h>
27#include <sys/types.h>
28#include <sys/wait.h>
29
30#include "absvr_msg.h"
31#include "zxic_fota_ab_upgrade.h"
32#include "softap_log.h"
33#include "at_reg.h"
34#include "softap_api.h"
35
36
37/*******************************************************************************
38 * Macro definitions *
lh758261d2023-07-13 05:52:04 -070039 ******************************************************************************/
xf.li742dd022023-06-08 01:43:32 -070040#define MSG_DATABUF_MAX_LEN (128)
41
42#define DEBUG 1
43
44//#define ABSVR_PRINT "SC_AB_SVR"
45
46/*******************************************************************************
47 * Type definitions *
48 ******************************************************************************/
49typedef struct
50{
lh758261d2023-07-13 05:52:04 -070051 int result; // 0: ³É¹¦ ·Ç0: ʧ°Ü
52 unsigned char dataBuf[MSG_DATABUF_MAX_LEN];
xf.li742dd022023-06-08 01:43:32 -070053} absvr_common_result_t;
54
55
56typedef struct
57{
lh758261d2023-07-13 05:52:04 -070058 int boot_to_system;
59 int reboot_flag;
xf.li742dd022023-06-08 01:43:32 -070060
lh758261d2023-07-13 05:52:04 -070061 int system;
62 int status;
xf.li742dd022023-06-08 01:43:32 -070063
lh758261d2023-07-13 05:52:04 -070064 int status_for_nv;
xf.li742dd022023-06-08 01:43:32 -070065
lh758261d2023-07-13 05:52:04 -070066 int sync_status;
67
68 char package_path[128];
69 int len;
xf.li742dd022023-06-08 01:43:32 -070070} absvr_common_req_msg_t;
71
72
73/*******************************************************************************
74 * Local variable definitions *
75 ******************************************************************************/
76
77
78/*******************************************************************************
79 * Global variable definitions *
80 ******************************************************************************/
81
82
83/*******************************************************************************
84 * Local function declarations *
85 ******************************************************************************/
86static void flush_upgrade_status(z_upgrade_status_info_t *p_status);
87
88static int absvr_get_upgrade_type(MSG_BUF *msg);
89static int absvr_verify(MSG_BUF *msg);
90static int absvr_update(MSG_BUF *msg);
91static int absvr_sync(MSG_BUF *msg);
92static int absvr_get_upgrade_status(MSG_BUF *msg);
93static int absvr_get_current_system(MSG_BUF *msg);
94static int absvr_get_boot_to_system(MSG_BUF *msg);
95static int absvr_set_boot_to_system(MSG_BUF *msg);
96static int absvr_get_system_status(MSG_BUF *msg);
97static int absvr_set_system_status(MSG_BUF *msg);
98static int absvr_get_fota_status_for_nv(MSG_BUF *msg);
99static int absvr_set_fota_status_for_nv(MSG_BUF *msg);
100static int absvr_get_sync_status(MSG_BUF *msg);
101static int absvr_set_sync_status(MSG_BUF *msg);
lh758261d2023-07-13 05:52:04 -0700102static int absvr_config_package_path(MSG_BUF *msg);
xf.li742dd022023-06-08 01:43:32 -0700103
104static int absvr_msg_proc(MSG_BUF *msg);
105
106
107/*******************************************************************************
108 * Local function implementations *
109 ******************************************************************************/
110static void flush_upgrade_status(z_upgrade_status_info_t *p_status)
111{
lh758261d2023-07-13 05:52:04 -0700112 absvr_common_result_t absvr_common_result = {0};
xf.li742dd022023-06-08 01:43:32 -0700113
lh758261d2023-07-13 05:52:04 -0700114 memcpy(absvr_common_result.dataBuf, p_status, sizeof(z_upgrade_status_info_t));
115
116 if (0 != send_soc_msg(FAR_PS, MODULE_ID_ABCLIENT, (unsigned short)ABSVR_UPDATING_RSP, sizeof(absvr_common_result),
117 (unsigned char *)(&absvr_common_result)))
118 {
119 slog(ABSVR_PRINT, SLOG_ERR, "Err: flush_upgrade_status send_soc_msg fail \n");
120 }
121
122 return;
xf.li742dd022023-06-08 01:43:32 -0700123}
124
125
126static int absvr_get_upgrade_type(MSG_BUF *msg)
127{
lh758261d2023-07-13 05:52:04 -0700128 absvr_common_result_t absvr_common_result = {0};
129 int ret = -1;
xf.li742dd022023-06-08 01:43:32 -0700130
lh758261d2023-07-13 05:52:04 -0700131 ret = zxic_dual_get_upgrade_type();
xf.li742dd022023-06-08 01:43:32 -0700132
lh758261d2023-07-13 05:52:04 -0700133 absvr_common_result.result = ret;
xf.li742dd022023-06-08 01:43:32 -0700134
lh758261d2023-07-13 05:52:04 -0700135 return send_soc_msg(FAR_PS, MODULE_ID_ABCLIENT, (unsigned short)ABSVR_GET_UPGRADE_TYPE_RSP, sizeof(absvr_common_result),
136 (unsigned char *)(&absvr_common_result));
xf.li742dd022023-06-08 01:43:32 -0700137}
lh758261d2023-07-13 05:52:04 -0700138
xf.li742dd022023-06-08 01:43:32 -0700139
140static int absvr_verify(MSG_BUF *msg)
141{
lh758261d2023-07-13 05:52:04 -0700142 absvr_common_result_t absvr_common_result = {0};
xf.li742dd022023-06-08 01:43:32 -0700143
lh758261d2023-07-13 05:52:04 -0700144 absvr_common_result.result = zxic_dual_verify();
xf.li742dd022023-06-08 01:43:32 -0700145
lh758261d2023-07-13 05:52:04 -0700146 return send_soc_msg(FAR_PS, MODULE_ID_ABCLIENT, (unsigned short)ABSVR_VRITFY_RSP, sizeof(absvr_common_result),
147 (unsigned char *)(&absvr_common_result));
xf.li742dd022023-06-08 01:43:32 -0700148}
149
150
151static int absvr_update(MSG_BUF *msg)
152{
lh758261d2023-07-13 05:52:04 -0700153 absvr_common_result_t absvr_common_result = {0};
xf.li742dd022023-06-08 01:43:32 -0700154
lh758261d2023-07-13 05:52:04 -0700155 z_upgrade_status_info_t status = {0};
156 z_upgrade_flush_status_t flush_status = {0};
xf.li742dd022023-06-08 01:43:32 -0700157
lh758261d2023-07-13 05:52:04 -0700158 flush_status.status = &status;
159 flush_status.status_cb = &flush_upgrade_status;
xf.li742dd022023-06-08 01:43:32 -0700160
lh758261d2023-07-13 05:52:04 -0700161 absvr_common_result.result = zxic_dual_upgrade(&flush_status);
162
163 return send_soc_msg(FAR_PS, MODULE_ID_ABCLIENT, (unsigned short)ABSVR_UPDATE_RSP, sizeof(absvr_common_result),
164 (unsigned char *)(&absvr_common_result));
xf.li742dd022023-06-08 01:43:32 -0700165}
166
167
168static int absvr_sync(MSG_BUF *msg)
169{
lh758261d2023-07-13 05:52:04 -0700170 absvr_common_result_t absvr_common_result = {0};
xf.li742dd022023-06-08 01:43:32 -0700171
lh758261d2023-07-13 05:52:04 -0700172 absvr_common_result.result = zxic_dual_sync_system();
xf.li742dd022023-06-08 01:43:32 -0700173
lh758261d2023-07-13 05:52:04 -0700174 return send_soc_msg(FAR_PS, MODULE_ID_ABCLIENT, (unsigned short)ABSVR_SYNC_RSP, sizeof(absvr_common_result),
175 (unsigned char *)(&absvr_common_result));
xf.li742dd022023-06-08 01:43:32 -0700176}
177
178
179static int absvr_get_upgrade_status(MSG_BUF *msg)
180{
lh758261d2023-07-13 05:52:04 -0700181 absvr_common_result_t absvr_common_result = {0};
182 int ret = -1;
xf.li742dd022023-06-08 01:43:32 -0700183
lh758261d2023-07-13 05:52:04 -0700184 z_upgrade_status_info_t upgrade_info = {0};
xf.li742dd022023-06-08 01:43:32 -0700185
lh758261d2023-07-13 05:52:04 -0700186 ret = zxic_dual_get_upgrade_status(&upgrade_info);
xf.li742dd022023-06-08 01:43:32 -0700187
lh758261d2023-07-13 05:52:04 -0700188 absvr_common_result.result = ret;
189 memcpy(absvr_common_result.dataBuf, &upgrade_info, sizeof(z_upgrade_status_info_t));
xf.li742dd022023-06-08 01:43:32 -0700190
lh758261d2023-07-13 05:52:04 -0700191 return send_soc_msg(FAR_PS, MODULE_ID_ABCLIENT, (unsigned short)ABSVR_GET_UPGRADE_STATUS_RSP,
192 sizeof(absvr_common_result), (unsigned char *)(&absvr_common_result));
xf.li742dd022023-06-08 01:43:32 -0700193}
194
195
196static int absvr_get_current_system(MSG_BUF *msg)
197{
lh758261d2023-07-13 05:52:04 -0700198 absvr_common_result_t absvr_common_result = {0};
199 int ret = -1;
xf.li742dd022023-06-08 01:43:32 -0700200
lh758261d2023-07-13 05:52:04 -0700201 ret = zxic_dual_get_current_system();
xf.li742dd022023-06-08 01:43:32 -0700202
lh758261d2023-07-13 05:52:04 -0700203 absvr_common_result.result = ret;
xf.li742dd022023-06-08 01:43:32 -0700204
lh758261d2023-07-13 05:52:04 -0700205 return send_soc_msg(FAR_PS, MODULE_ID_ABCLIENT, (unsigned short)ABSVR_GET_CURRENT_SYSTEM_RSP,
206 sizeof(absvr_common_result), (unsigned char *)(&absvr_common_result));
xf.li742dd022023-06-08 01:43:32 -0700207}
208
209
210static int absvr_get_boot_to_system(MSG_BUF *msg)
211{
lh758261d2023-07-13 05:52:04 -0700212 absvr_common_result_t absvr_common_result = {0};
213 int ret = -1;
xf.li742dd022023-06-08 01:43:32 -0700214
lh758261d2023-07-13 05:52:04 -0700215 ret = zxic_dual_get_boot_to_system();
xf.li742dd022023-06-08 01:43:32 -0700216
lh758261d2023-07-13 05:52:04 -0700217 absvr_common_result.result = ret;
xf.li742dd022023-06-08 01:43:32 -0700218
lh758261d2023-07-13 05:52:04 -0700219 return send_soc_msg(FAR_PS, MODULE_ID_ABCLIENT, (unsigned short)ABSVR_GET_BOOT_TO_SYSTEM_RSP,
220 sizeof(absvr_common_result), (unsigned char *)(&absvr_common_result));
xf.li742dd022023-06-08 01:43:32 -0700221}
222
223
224static int absvr_set_boot_to_system(MSG_BUF *msg)
225{
lh758261d2023-07-13 05:52:04 -0700226 absvr_common_req_msg_t *common_req_msg = NULL;
xf.li742dd022023-06-08 01:43:32 -0700227
lh758261d2023-07-13 05:52:04 -0700228 absvr_common_result_t absvr_common_result = {0};
229 int ret = -1;
xf.li742dd022023-06-08 01:43:32 -0700230
lh758261d2023-07-13 05:52:04 -0700231 common_req_msg = (absvr_common_req_msg_t *)(msg->aucDataBuf);
xf.li742dd022023-06-08 01:43:32 -0700232
lh758261d2023-07-13 05:52:04 -0700233 ret = zxic_dual_set_boot_to_system(common_req_msg->boot_to_system, common_req_msg->reboot_flag);
234
235 absvr_common_result.result = ret;
236
237 return send_soc_msg(FAR_PS, MODULE_ID_ABCLIENT, (unsigned short)ABSVR_SET_BOOT_TO_SYSTEM_RSP,
238 sizeof(absvr_common_result), (unsigned char *)(&absvr_common_result));
xf.li742dd022023-06-08 01:43:32 -0700239}
240
241
242static int absvr_get_system_status(MSG_BUF *msg)
243{
lh758261d2023-07-13 05:52:04 -0700244 absvr_common_result_t absvr_common_result = {0};
245 int ret = -1;
xf.li742dd022023-06-08 01:43:32 -0700246
lh758261d2023-07-13 05:52:04 -0700247 z_upgrade_system_info_t system_info = {0};
xf.li742dd022023-06-08 01:43:32 -0700248
lh758261d2023-07-13 05:52:04 -0700249 ret = zxic_dual_get_system_status(&system_info);
xf.li742dd022023-06-08 01:43:32 -0700250
lh758261d2023-07-13 05:52:04 -0700251 absvr_common_result.result = ret;
252 memcpy(absvr_common_result.dataBuf, &system_info, sizeof(z_upgrade_system_info_t));
xf.li742dd022023-06-08 01:43:32 -0700253
lh758261d2023-07-13 05:52:04 -0700254 return send_soc_msg(FAR_PS, MODULE_ID_ABCLIENT, (unsigned short)ABSVR_GET_SYSTEM_STATUS_RSP,
255 sizeof(absvr_common_result), (unsigned char *)(&absvr_common_result));
xf.li742dd022023-06-08 01:43:32 -0700256}
257
258
259static int absvr_set_system_status(MSG_BUF *msg)
260{
lh758261d2023-07-13 05:52:04 -0700261 absvr_common_req_msg_t *common_req_msg = NULL;
xf.li742dd022023-06-08 01:43:32 -0700262
lh758261d2023-07-13 05:52:04 -0700263 absvr_common_result_t absvr_common_result = {0};
264 int ret = -1;
xf.li742dd022023-06-08 01:43:32 -0700265
lh758261d2023-07-13 05:52:04 -0700266 common_req_msg = (absvr_common_req_msg_t *)(msg->aucDataBuf);
xf.li742dd022023-06-08 01:43:32 -0700267
lh758261d2023-07-13 05:52:04 -0700268 ret = zxic_dual_set_system_status(common_req_msg->system, common_req_msg->status);
269
270 absvr_common_result.result = ret;
271
272 return send_soc_msg(FAR_PS, MODULE_ID_ABCLIENT, (unsigned short)ABSVR_SET_SYSTEM_STATUS_RSP,
273 sizeof(absvr_common_result), (unsigned char *)(&absvr_common_result));
xf.li742dd022023-06-08 01:43:32 -0700274}
275
276
277static int absvr_get_fota_status_for_nv(MSG_BUF *msg)
278{
lh758261d2023-07-13 05:52:04 -0700279 absvr_common_result_t absvr_common_result = {0};
280 int ret = -1;
xf.li742dd022023-06-08 01:43:32 -0700281
lh758261d2023-07-13 05:52:04 -0700282 ret = zxic_dual_get_fota_status_for_nv();
xf.li742dd022023-06-08 01:43:32 -0700283
lh758261d2023-07-13 05:52:04 -0700284 absvr_common_result.result = ret;
xf.li742dd022023-06-08 01:43:32 -0700285
lh758261d2023-07-13 05:52:04 -0700286 return send_soc_msg(FAR_PS, MODULE_ID_ABCLIENT, (unsigned short)ABSVR_GET_FOTA_STATUS_FOR_NV_RSP,
287 sizeof(absvr_common_result), (unsigned char *)(&absvr_common_result));
xf.li742dd022023-06-08 01:43:32 -0700288}
289
290
291static int absvr_set_fota_status_for_nv(MSG_BUF *msg)
292{
lh758261d2023-07-13 05:52:04 -0700293 absvr_common_req_msg_t *common_req_msg = NULL;
xf.li742dd022023-06-08 01:43:32 -0700294
lh758261d2023-07-13 05:52:04 -0700295 absvr_common_result_t absvr_common_result = {0};
296 int ret = -1;
xf.li742dd022023-06-08 01:43:32 -0700297
lh758261d2023-07-13 05:52:04 -0700298 common_req_msg = (absvr_common_req_msg_t *)(msg->aucDataBuf);
xf.li742dd022023-06-08 01:43:32 -0700299
lh758261d2023-07-13 05:52:04 -0700300 ret = zxic_dual_set_fota_status_for_nv(common_req_msg->status_for_nv);
301
302 absvr_common_result.result = ret;
303
304 return send_soc_msg(FAR_PS, MODULE_ID_ABCLIENT, (unsigned short)ABSVR_SET_FOTA_STATUS_FOR_NV_RSP,
305 sizeof(absvr_common_result), (unsigned char *)(&absvr_common_result));
xf.li742dd022023-06-08 01:43:32 -0700306}
307
308
309static int absvr_get_sync_status(MSG_BUF *msg)
lh758261d2023-07-13 05:52:04 -0700310{
311 absvr_common_result_t absvr_common_result = {0};
xf.li742dd022023-06-08 01:43:32 -0700312
lh758261d2023-07-13 05:52:04 -0700313 zxic_dual_get_sync_status(&(absvr_common_result.result));
314
315 return send_soc_msg(FAR_PS, MODULE_ID_ABCLIENT, (unsigned short)ABSVR_GET_SYNC_STATUS_RSP, sizeof(absvr_common_result),
316 (unsigned char *)(&absvr_common_result));
xf.li742dd022023-06-08 01:43:32 -0700317}
318
319
320static int absvr_set_sync_status(MSG_BUF *msg)
321{
lh758261d2023-07-13 05:52:04 -0700322 absvr_common_req_msg_t *common_req_msg = NULL;
xf.li742dd022023-06-08 01:43:32 -0700323
lh758261d2023-07-13 05:52:04 -0700324 absvr_common_result_t absvr_common_result = {0};
325 int ret = -1;
xf.li742dd022023-06-08 01:43:32 -0700326
lh758261d2023-07-13 05:52:04 -0700327 common_req_msg = (absvr_common_req_msg_t *)(msg->aucDataBuf);
xf.li742dd022023-06-08 01:43:32 -0700328
lh758261d2023-07-13 05:52:04 -0700329 ret = zxic_dual_set_sync_status(common_req_msg->sync_status);
330
331 absvr_common_result.result = ret;
332
333 return send_soc_msg(FAR_PS, MODULE_ID_ABCLIENT, (unsigned short)ABSVR_SET_SYNC_STATUS_RSP, sizeof(absvr_common_result),
334 (unsigned char *)(&absvr_common_result));
335}
336
337
338static int absvr_config_package_path(MSG_BUF *msg)
339{
340 absvr_common_req_msg_t *common_req_msg = NULL;
341
342 absvr_common_result_t absvr_common_result = {0};
343 int ret = -1;
344
345 common_req_msg = (absvr_common_req_msg_t *)(msg->aucDataBuf);
346
347 ret = zxic_dual_config_package_path(common_req_msg->package_path, common_req_msg->len);
348
349 absvr_common_result.result = ret;
350
351 return send_soc_msg(FAR_PS, MODULE_ID_ABCLIENT, (unsigned short)ABSVR_CONFIG_PACKAGE_PATH_RSP,
352 sizeof(absvr_common_result), (unsigned char *)(&absvr_common_result));
xf.li742dd022023-06-08 01:43:32 -0700353}
354
355
356static int absvr_msg_proc(MSG_BUF *msg)
357{
lh758261d2023-07-13 05:52:04 -0700358 int ret = 0;
xf.li742dd022023-06-08 01:43:32 -0700359
lh758261d2023-07-13 05:52:04 -0700360 if ( NULL == msg)
361 {
362 slog(ABSVR_PRINT, SLOG_ERR, "Err: absvr_msg_proc msg is NULL \n");
363 return -1;
364 }
xf.li742dd022023-06-08 01:43:32 -0700365
lh758261d2023-07-13 05:52:04 -0700366 slog(ABSVR_PRINT, SLOG_NORMAL, "absvr_msg_proc start process msg [%hu] \n", msg->usMsgCmd);
xf.li742dd022023-06-08 01:43:32 -0700367
lh758261d2023-07-13 05:52:04 -0700368 switch (msg->usMsgCmd)
369 {
370 case ABSVR_GET_UPGRADE_TYPE_REQ:
371 ret = absvr_get_upgrade_type(msg);
372 break;
373 case ABSVR_VRITFY_REQ:
374 ret = absvr_verify(msg);
375 break;
376 case ABSVR_UPDATE_REQ:
377 ret = absvr_update(msg);
378 break;
379 case ABSVR_SYNC_REQ:
380 ret = absvr_sync(msg);
381 break;
382 case ABSVR_GET_UPGRADE_STATUS_REQ:
383 ret = absvr_get_upgrade_status(msg);
384 break;
385 case ABSVR_GET_CURRENT_SYSTEM_REQ:
386 ret = absvr_get_current_system(msg);
387 break;
388 case ABSVR_GET_BOOT_TO_SYSTEM_REQ:
389 ret = absvr_get_boot_to_system(msg);
390 break;
391 case ABSVR_SET_BOOT_TO_SYSTEM_REQ:
392 ret = absvr_set_boot_to_system(msg);
393 break;
394 case ABSVR_GET_SYSTEM_STATUS_REQ:
395 ret = absvr_get_system_status(msg);
396 break;
397 case ABSVR_SET_SYSTEM_STATUS_REQ:
398 ret = absvr_set_system_status(msg);
399 break;
400 case ABSVR_GET_FOTA_STATUS_FOR_NV_REQ:
401 ret = absvr_get_fota_status_for_nv(msg);
402 break;
403 case ABSVR_SET_FOTA_STATUS_FOR_NV_REQ:
404 ret = absvr_set_fota_status_for_nv(msg);
405 break;
406 case ABSVR_GET_SYNC_STATUS_REQ:
407 ret = absvr_get_sync_status(msg);
408 break;
409 case ABSVR_SET_SYNC_STATUS_REQ:
410 ret = absvr_set_sync_status(msg);
411 break;
412 case ABSVR_CONFIG_PACKAGE_PATH_REQ:
413 ret = absvr_config_package_path(msg);
414 break;
415 default:
416 slog(ABSVR_PRINT, SLOG_ERR, "Err: absvr_msg_proc unknow usMsgCmd [%hu] \n", msg->usMsgCmd);
417 break;
418 }
419
420 return ret;
xf.li742dd022023-06-08 01:43:32 -0700421}
422
423
424/*******************************************************************************
425 * Global function implementations *
426 ******************************************************************************/
427
428int main(void)
429{
lh758261d2023-07-13 05:52:04 -0700430 int iRet = 0;
xf.li742dd022023-06-08 01:43:32 -0700431
lh758261d2023-07-13 05:52:04 -0700432 int iMsgHandle = 0;
433 MSG_BUF stMsg = {0};
434 LONG msgSize = sizeof(MSG_BUF) - sizeof(LONG);
xf.li742dd022023-06-08 01:43:32 -0700435
lh758261d2023-07-13 05:52:04 -0700436 /*¸ù¾ÝNV³õʼ»¯´òÓ¡¼¶±ð£¬²¢×¢²á¶¯Ì¬µ÷Õû´òÓ¡¼¶±ðÐźÅÁ¿*/
437 loglevel_init();
438 slog(ABSVR_PRINT, SLOG_NORMAL, "sc_absvr begin ======= build date: %s %s \n", __DATE__, __TIME__);
xf.li742dd022023-06-08 01:43:32 -0700439
lh758261d2023-07-13 05:52:04 -0700440 iMsgHandle = msgget(MODULE_ID_ABSVR, IPC_CREAT | 0600);
441 if (-1 == iMsgHandle)
442 {
443 slog(ABSVR_PRINT, SLOG_ERR, "Err: can not create msg queue for sc_absvr \n");
444 return -1;
445 }
446
447 for (;;)
448 {
449 memset(&stMsg, 0, sizeof(stMsg));
450 iRet = 0;
451 iRet = msgrcv(iMsgHandle, &stMsg, msgSize, 0, 0);
452 if (-1 == iRet)
453 {
454 slog(ABSVR_PRINT, SLOG_ERR, "Err: recv msg fail errno = %d \n", errno);
455 continue;
456 }
457
458 if (0 != absvr_msg_proc(&stMsg))
459 {
460 slog(ABSVR_PRINT, SLOG_ERR, "Err: absvr_msg_proc src_id[%d] usMsgCmd[%hu] fail \n", stMsg.src_id, stMsg.usMsgCmd);
461 }
462 }
463
464 return 0;
xf.li742dd022023-06-08 01:43:32 -0700465}
466