|
|
|
@ -189,15 +189,24 @@ void *onvifMediaObserver::probeThreadProc(void *ptr){ |
|
|
|
if( tArr->size() > 0 ) { |
|
|
|
for( int index = 0; index < tArr->size(); index++){ |
|
|
|
char *tPtr; |
|
|
|
if( tPtr = strcasestr( tArr->at(index), "mac/" ) ){ |
|
|
|
if( tPtr = strstr( tArr->at(index), "mac/" ) ){ |
|
|
|
sprintf(tRecord->MAC,"%s",tPtr+4); |
|
|
|
}; |
|
|
|
if( tPtr = strcasestr( tArr->at(index), "hardware/" ) ){ |
|
|
|
if( tPtr = strstr( tArr->at(index), "hardware/" ) ){ |
|
|
|
sprintf(tRecord->Hardware,"%s",tPtr+9); |
|
|
|
}; |
|
|
|
if( tPtr = strcasestr( tArr->at(index), "name/" ) ){ |
|
|
|
if( tPtr = strstr( tArr->at(index), "name/" ) ){ |
|
|
|
sprintf(tRecord->Name,"%s",tPtr+5); |
|
|
|
}; |
|
|
|
if (tPtr = strstr(tArr->at(index), "MAC/")) { |
|
|
|
sprintf(tRecord->MAC, "%s", tPtr + 4); |
|
|
|
}; |
|
|
|
if (tPtr = strstr(tArr->at(index), "HARDWARE/")) { |
|
|
|
sprintf(tRecord->Hardware, "%s", tPtr + 9); |
|
|
|
}; |
|
|
|
if (tPtr = strstr(tArr->at(index), "NAME/")) { |
|
|
|
sprintf(tRecord->Name, "%s", tPtr + 5); |
|
|
|
}; |
|
|
|
}; |
|
|
|
tArr->clear(); |
|
|
|
}; |
|
|
|
@ -211,7 +220,7 @@ void *onvifMediaObserver::probeThreadProc(void *ptr){ |
|
|
|
tArr = explode(' ',tBuf); |
|
|
|
if( tArr->size() > 0 ) { |
|
|
|
for(int index=0; index < tArr->size(); index++) { |
|
|
|
if( strcasestr( tArr->at(index), "[" ) != NULL ){ |
|
|
|
if( strstr( tArr->at(index), "[" ) != NULL ){ |
|
|
|
// IPv6
|
|
|
|
} else{ |
|
|
|
// IPv4
|
|
|
|
|