[asterisk-commits] may: branch 1.8 r316874 - /branches/1.8/addons/ooh323c/src/ooSocket.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed May 4 15:50:23 CDT 2011
Author: may
Date: Wed May 4 15:50:18 2011
New Revision: 316874
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=316874
Log:
Fix trivial bug in ooSocket.c codes
Revert condition for result code of
ast_gethostbyname
(closes issue #19185)
Reported by: dswartz
Patches:
issue19185-patch uploaded by may213 (license 454)
Modified:
branches/1.8/addons/ooh323c/src/ooSocket.c
Modified: branches/1.8/addons/ooh323c/src/ooSocket.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/addons/ooh323c/src/ooSocket.c?view=diff&rev=316874&r1=316873&r2=316874
==============================================================================
--- branches/1.8/addons/ooh323c/src/ooSocket.c (original)
+++ branches/1.8/addons/ooh323c/src/ooSocket.c Wed May 4 15:50:18 2011
@@ -522,10 +522,10 @@
ret = gethostname(hostname, 100);
if(ret == 0)
{
- if (!(hp = ast_gethostbyname(hostname, &phost))) {
+ if ((hp = ast_gethostbyname(hostname, &phost))) {
struct in_addr i;
memcpy(&i, hp->h_addr, sizeof(i));
- strcpy(pIPAddrs, (ast_inet_ntoa(i) == NULL) ? "127.0.0.1" : ast_inet_ntoa(i));
+ strcpy(pIPAddrs, (ast_inet_ntoa(i) == NULL) ? "127.0.0.1" : ast_inet_ntoa(i));
} else {
return -1;
}
More information about the asterisk-commits
mailing list