Fixed pj_gethostip() returns 0.0.0.0. Also how it returns the first interface if else fails

git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@1599 74dad513-b988-da41-8d7b-12977e46ad98
diff --git a/pjlib/include/pj/addr_resolv.h b/pjlib/include/pj/addr_resolv.h
index e69abcf..b066bc9 100644
--- a/pjlib/include/pj/addr_resolv.h
+++ b/pjlib/include/pj/addr_resolv.h
@@ -106,6 +106,18 @@
 
 
 /**
+ * Get the IP address of the default interface. Default interface is the
+ * interface of the default route.
+ *
+ * @param ip_addr   On successful resolution, this will be filled up with
+ *		    the IP address, in network byte order.
+ *
+ * @return	    PJ_SUCCESS on success, or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pj_getdefaultipinterface(pj_in_addr *ip_addr);
+
+
+/**
  * This function translates the name of a service location (for example, 
  * a host name) and returns a set of addresses and associated information
  * to be used in creating a socket with which to address the specified