change ping using popen
git-svn-id: http://172.17.0.253/svn/soft_pkgs/sys_nicmonitor@804 09c3743a-b0dd-45d3-b506-aa74c7a2a6ef
This commit is contained in:
@@ -454,7 +454,7 @@ static void *send_inc_info(void *p)
|
||||
while(1){
|
||||
i = 0;
|
||||
get_sem(ptr->semid);
|
||||
memset(ptr->shm_ptr, 0, sizeof(SHM));
|
||||
// memset(ptr->shm_ptr, 0, sizeof(SHM));
|
||||
curr = ptr->listp->next;
|
||||
while(curr != NULL){
|
||||
get_inc_info(&curr->info);
|
||||
@@ -643,7 +643,7 @@ int ping_gw(char *devname)
|
||||
return 0;
|
||||
}else{
|
||||
fgets(getbuf,sizeof(getbuf),fp);
|
||||
if(strncmp(getbuf,"1",1) == 0)
|
||||
if(strncmp(getbuf,"0",1) != 0)
|
||||
{
|
||||
pclose(fp);
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user