stub proc_port for all platforms
This commit is contained in:
		
							parent
							
								
									c31d2c5712
								
							
						
					
					
						commit
						bcb098a34d
					
				@ -868,18 +868,12 @@ JNIEXPORT jlong SIGAR_JNI(Sigar_getProcPort)
 | 
			
		||||
    sigar_pid_t pid;
 | 
			
		||||
    dSIGAR(0);
 | 
			
		||||
 | 
			
		||||
#if defined(__linux__) || defined(WIN32)
 | 
			
		||||
    /* just thinking about implementing this on other platforms hurts */
 | 
			
		||||
    status = sigar_proc_port_get(sigar, SIGAR_NETCONN_TCP,
 | 
			
		||||
    status = sigar_proc_port_get(sigar, SIGAR_NETCONN_TCP, /*XXX UDP*/
 | 
			
		||||
                                 (unsigned long)port, &pid);
 | 
			
		||||
    if (status != SIGAR_OK) {
 | 
			
		||||
        sigar_throw_error(env, jsigar, status);
 | 
			
		||||
        return -1;
 | 
			
		||||
    }
 | 
			
		||||
#else
 | 
			
		||||
    status = SIGAR_ENOTIMPL;
 | 
			
		||||
    pid = -1;
 | 
			
		||||
    sigar_throw_error(env, jsigar, status);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
    return pid;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -1546,3 +1546,9 @@ int sigar_net_connection_list_get(sigar_t *sigar,
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
int sigar_proc_port_get(sigar_t *sigar, int protocol,
 | 
			
		||||
                        unsigned long port, sigar_pid_t *pid)
 | 
			
		||||
{
 | 
			
		||||
    return SIGAR_ENOTIMPL;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -808,3 +808,9 @@ int sigar_net_connection_list_get(sigar_t *sigar,
 | 
			
		||||
{
 | 
			
		||||
    return SIGAR_ENOTIMPL;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int sigar_proc_port_get(sigar_t *sigar, int protocol,
 | 
			
		||||
                        unsigned long port, sigar_pid_t *pid)
 | 
			
		||||
{
 | 
			
		||||
    return SIGAR_ENOTIMPL;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -527,3 +527,9 @@ int sigar_net_connection_list_get(sigar_t *sigar,
 | 
			
		||||
{
 | 
			
		||||
    return SIGAR_ENOTIMPL;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int sigar_proc_port_get(sigar_t *sigar, int protocol,
 | 
			
		||||
                        unsigned long port, sigar_pid_t *pid)
 | 
			
		||||
{
 | 
			
		||||
    return SIGAR_ENOTIMPL;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -2010,3 +2010,9 @@ int sigar_net_connection_list_get(sigar_t *sigar,
 | 
			
		||||
 | 
			
		||||
    return SIGAR_OK;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int sigar_proc_port_get(sigar_t *sigar, int protocol,
 | 
			
		||||
                        unsigned long port, sigar_pid_t *pid)
 | 
			
		||||
{
 | 
			
		||||
    return SIGAR_ENOTIMPL;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -257,3 +257,9 @@ int sigar_net_connection_list_get(sigar_t *sigar,
 | 
			
		||||
{
 | 
			
		||||
    return SIGAR_ENOTIMPL;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int sigar_proc_port_get(sigar_t *sigar, int protocol,
 | 
			
		||||
                        unsigned long port, sigar_pid_t *pid)
 | 
			
		||||
{
 | 
			
		||||
    return SIGAR_ENOTIMPL;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user