forked from osmocom/wireshark
When dumpcap is being run by another program, its standard error gets
consumed by that program, and that program only ends up reporting one of those errors. Therefore, only log one of them; we're seeing errors in the buildbot, and we want the more detailed error, so don't log a message after GetInterfaceFriendlyNameFromDeviceGuid() returns an error, just rely on the error logged by GetInterfaceFriendlyNameFromDeviceGuid(). Ultimately, we don't want to print anything to the standard output or error at all, as that stuff ends up being consumed by the program in question; we should either ignore the error (if it's an "expected" error) or report it through the API so the the caller can, in turn, report it appropriately. svn path=/trunk/; revision=46099
This commit is contained in:
parent
303ce49ecd
commit
7a9aef34a9
|
@ -297,9 +297,7 @@ void get_windows_interface_friendlyname(/* IN */ char *interface_devicename, /*
|
|||
{
|
||||
int r=GetInterfaceFriendlyNameFromDeviceGuid(&guid, interface_friendlyname);
|
||||
if(r!=NO_ERROR){
|
||||
g_log(LOG_DOMAIN_CAPTURE, G_LOG_LEVEL_ERROR,
|
||||
"Failed to retrieve interface friendly name associated with interface '%s', LastErrorCode=0x%08x.",
|
||||
interface_devicename, GetLastError());
|
||||
/* A message has been logged by GetInterfaceFriendlyNameFromDeviceGuid() */
|
||||
*interface_friendlyname=NULL; /* failed to get friendly name, ensure the ultimate result is NULL */
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue