Merge remote-tracking branch 'check/next-cc'

Lightly tested only...


Origin commit data
------------------
Branch: ni/coolstream
Commit: cdd065fc2e
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2013-12-25 (Wed, 25 Dec 2013)



------------------
This commit was generated by Migit
This commit is contained in:
Stefan Seyfried
2013-12-25 22:51:23 +01:00
90 changed files with 1583 additions and 1578 deletions

View File

@@ -34,10 +34,7 @@
CNetworkConfig::CNetworkConfig()
{
char our_nameserver[16];
netGetNameserver(our_nameserver);
nameserver = our_nameserver;
netGetNameserver(nameserver);
ifname = "eth0";
orig_automatic_start = false;
orig_inet_static = false;
@@ -73,13 +70,13 @@ void CNetworkConfig::readConfig(std::string iname)
void CNetworkConfig::init_vars(void)
{
char mask[16];
char _broadcast[16];
char router[16];
char ip[16];
std::string mask;
std::string _broadcast;
std::string router;
std::string ip;
unsigned char addr[6];
hostname = netGetHostname();
netGetHostname(hostname);
netGetDefaultRoute(router);
gateway = router;
@@ -87,13 +84,13 @@ void CNetworkConfig::init_vars(void)
/* FIXME its enough to read IP for dhcp only ?
* static config should not be different from settings in etc/network/interfaces */
if(!inet_static) {
netGetIP((char *) ifname.c_str(), ip, mask, _broadcast);
netGetIP(ifname, ip, mask, _broadcast);
netmask = mask;
broadcast = _broadcast;
address = ip;
}
netGetMacAddr((char *) ifname.c_str(), addr);
netGetMacAddr(ifname, addr);
std::stringstream mac_tmp;
for(int i=0;i<6;++i)
@@ -190,7 +187,7 @@ void CNetworkConfig::commitConfig(void)
printf("CNetworkConfig::commitConfig: modified, saving (wireless %d, ssid %s key %s)...\n", wireless, ssid.c_str(), key.c_str());
#endif
if(orig_hostname != hostname)
netSetHostname((char *) hostname.c_str());
netSetHostname(hostname);
if (inet_static)
{
@@ -211,7 +208,7 @@ void CNetworkConfig::commitConfig(void)
if (nameserver != orig_nameserver)
{
orig_nameserver = nameserver;
netSetNameserver(nameserver.c_str());
netSetNameserver(nameserver);
}
}