Added warning messages.

This commit is contained in:
Salvatore Pitrulli 2011-05-24 13:03:13 +02:00
parent dcd22c99a1
commit f8b07cdf64
2 changed files with 16 additions and 4 deletions

View File

@ -809,9 +809,13 @@ void addAddress(const char * ifname, const char * ipaddr)
else{ else{
execProcess(&exitCode,"netsh interface ipv6 add address \"%s\" %s",if_name,ipaddr); execProcess(&exitCode,"netsh interface ipv6 add address \"%s\" %s",if_name,ipaddr);
} }
if(exitCode==0) if(exitCode==0){
clean_addr = true; clean_addr = true;
} }
else {
fprintf(stderr, "WARNING: subprocess exited with code %ld\n", exitCode);
}
}
void delAddress(const char * ifname, const char * ipaddr) void delAddress(const char * ifname, const char * ipaddr)
{ {
@ -847,9 +851,13 @@ void addLoWPANRoute(const char * ifname, const char * net, const char * gw)
DWORD exitCode = -1; DWORD exitCode = -1;
execProcess(&exitCode,"netsh interface ipv6 add route %s/64 \"%s\" %s", net, if_name, gw); execProcess(&exitCode,"netsh interface ipv6 add route %s/64 \"%s\" %s", net, if_name, gw);
if(exitCode==0) if(exitCode==0){
clean_route = true; clean_route = true;
} }
else {
fprintf(stderr, "WARNING: subprocess exited with code %ld\n", exitCode);
}
}
void delLoWPANRoute(const char * ifname, const char * net) void delLoWPANRoute(const char * ifname, const char * net)
{ {
@ -862,9 +870,13 @@ void addNeighbor(const char * ifname, const char * neighb, const char * neighb_m
if(osVersionInfo.dwMajorVersion >= 6){ if(osVersionInfo.dwMajorVersion >= 6){
execProcess(&exitCode,"netsh interface ipv6 add neighbor \"%s\" %s \"%s\"", if_name, neighb, neighb_mac); execProcess(&exitCode,"netsh interface ipv6 add neighbor \"%s\" %s \"%s\"", if_name, neighb, neighb_mac);
if(exitCode==0) if(exitCode==0){
clean_neighb = true; clean_neighb = true;
} }
else {
fprintf(stderr, "WARNING: subprocess exited with code %ld\n", exitCode);
}
}
} }
void delNeighbor(const char * ifname, const char * neighb) void delNeighbor(const char * ifname, const char * neighb)