[prev in list] [next in list] [prev in thread] [next in thread] 

List:       haiku-commits
Subject:    [Haiku-commits] r30922 - haiku/trunk/src/kits/network/dns/irs
From:       bonefish () mail ! berlios ! de
Date:       2009-05-30 12:33:13
Message-ID: 200905301233.n4UCXDnp013464 () sheep ! berlios ! de
[Download RAW message or body]

Author: bonefish
Date: 2009-05-30 14:33:11 +0200 (Sat, 30 May 2009)
New Revision: 30922
ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=30922&view=rev

Modified:
   haiku/trunk/src/kits/network/dns/irs/lcl_sv.cpp
Log:
* 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.


Modified: haiku/trunk/src/kits/network/dns/irs/lcl_sv.cpp
===================================================================
--- haiku/trunk/src/kits/network/dns/irs/lcl_sv.cpp	2009-05-30 12:20:11 UTC (rev 30921)
+++ haiku/trunk/src/kits/network/dns/irs/lcl_sv.cpp	2009-05-30 12:33:11 UTC (rev 30922)
@@ -91,24 +91,6 @@
 };
 
 
-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 @@
 	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

_______________________________________________
Haiku-commits mailing list
Haiku-commits@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/haiku-commits
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic