From 9738f996e375f028f7d299650ec31e591488fab7 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Sat, 30 May 2009 12:33:11 +0000 Subject: [PATCH] * Removed unused find_own_image(). * sv_rewind(): Init the cookie to 0 before using it for get_next_image_info() iteration. This could cause the function not to find the libnetwork path and thus fail to open the "services" attribute. The getserv*() functions would always fail and the net server wouldn't be able to listen on the telnet and ftp ports. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30922 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/network/dns/irs/lcl_sv.cpp | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/src/kits/network/dns/irs/lcl_sv.cpp b/src/kits/network/dns/irs/lcl_sv.cpp index 29b2816322..3b8a7a6d41 100644 --- a/src/kits/network/dns/irs/lcl_sv.cpp +++ b/src/kits/network/dns/irs/lcl_sv.cpp @@ -91,24 +91,6 @@ struct service_private { }; -static status_t -find_own_image(image_info* _info) -{ - int32 cookie = 0; - image_info info; - while (get_next_image_info(B_CURRENT_TEAM, &cookie, &info) == B_OK) { - if (((uint32)info.text <= (uint32)find_own_image - && (uint32)info.text + (uint32)info.text_size > (uint32)find_own_image)) { - // found us - *_info = info; - return B_OK; - } - } - - return B_ENTRY_NOT_FOUND; -} - - char * get_next_line(struct service_private* service) { @@ -160,7 +142,7 @@ sv_rewind(struct irs_sv *sv) addr_t addressInImage = (addr_t)&sv_rewind; const char* path = NULL; image_info info; - int32 cookie; + int32 cookie = 0; while (get_next_image_info(B_CURRENT_TEAM, &cookie, &info) == B_OK) { if (addressInImage >= (addr_t)info.text