diff --git a/openair-cn/SGW-LITE/spgw_config.c b/openair-cn/SGW-LITE/spgw_config.c index abfbb607903c53716a45535ad4effe5fbf3bfe77..1ff16dd99ae10df848627bef8fa8434f49d42c63 100755 --- a/openair-cn/SGW-LITE/spgw_config.c +++ b/openair-cn/SGW-LITE/spgw_config.c @@ -132,13 +132,16 @@ sgw_ipv6_mask_in6_addr( int spgw_system(char *command_pP, int abort_on_errorP) { - int ret = 0; - ret = system(command_pP); - if (ret < 0) { - SPGW_APP_ERROR("ERROR in system command %s: %d\n", + int ret = -1; + if (command_pP) { + SPGW_APP_INFO("system command: %s\n",command_pP); + ret = system(command_pP); + if (ret < 0) { + SPGW_APP_ERROR("ERROR in system command %s: %d\n", command_pP,ret); - if (abort_on_errorP) { - exit(-1); // may be not exit + if (abort_on_errorP) { + exit(-1); // may be not exit + } } } return ret;