* 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
This commit is contained in:
parent
e81f1b80e9
commit
9738f996e3
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user