diff options
| author | Grant Limberg <glimberg@gmail.com> | 2015-04-30 19:19:45 -0700 |
|---|---|---|
| committer | Grant Limberg <glimberg@gmail.com> | 2015-04-30 19:19:45 -0700 |
| commit | 52df59c55299419feb16a5daeed01389f4fafc73 (patch) | |
| tree | 5d081b9a9c14566c07cea8b661bf74acee0be312 /service/ControlPlane.cpp | |
| parent | 9464504e4a68755296b96fcc3df4afe1ce79b681 (diff) | |
| parent | d3820049b82f756ba6c9c3390d4060ee1ad49925 (diff) | |
| download | infinitytier-52df59c55299419feb16a5daeed01389f4fafc73.tar.gz infinitytier-52df59c55299419feb16a5daeed01389f4fafc73.zip | |
Merge branch 'adamierymenko-dev' into android-jni
Conflicts:
.gitignore
Diffstat (limited to 'service/ControlPlane.cpp')
| -rw-r--r-- | service/ControlPlane.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/service/ControlPlane.cpp b/service/ControlPlane.cpp index e40aad9b..3604dd1e 100644 --- a/service/ControlPlane.cpp +++ b/service/ControlPlane.cpp @@ -71,13 +71,13 @@ static std::string _jsonEnumerate(const ZT1_MulticastGroup *mg,unsigned int coun if (i > 0) buf.push_back(','); Utils::snprintf(tmp,sizeof(tmp),"\"%.2x:%.2x:%.2x:%.2x:%.2x:%.2x\\/%.8lx\"", - (unsigned int)((mg->mac >> 40) & 0xff), - (unsigned int)((mg->mac >> 32) & 0xff), - (unsigned int)((mg->mac >> 24) & 0xff), - (unsigned int)((mg->mac >> 16) & 0xff), - (unsigned int)((mg->mac >> 8) & 0xff), - (unsigned int)(mg->mac & 0xff), - mg->adi); + (unsigned int)((mg[i].mac >> 40) & 0xff), + (unsigned int)((mg[i].mac >> 32) & 0xff), + (unsigned int)((mg[i].mac >> 24) & 0xff), + (unsigned int)((mg[i].mac >> 16) & 0xff), + (unsigned int)((mg[i].mac >> 8) & 0xff), + (unsigned int)(mg[i].mac & 0xff), + (unsigned long)(mg[i].adi)); buf.append(tmp); } buf.push_back(']'); @@ -92,7 +92,7 @@ static std::string _jsonEnumerate(const struct sockaddr_storage *ss,unsigned int if (i > 0) buf.push_back(','); buf.push_back('"'); - buf.append(_jsonEscape(reinterpret_cast<const InetAddress *>(ss)->toString())); + buf.append(_jsonEscape(reinterpret_cast<const InetAddress *>(&(ss[i]))->toString())); buf.push_back('"'); } buf.push_back(']'); |
