fix print_cookies to use iterator

This commit is contained in:
ehouse 2005-09-14 05:14:41 +00:00
parent c4d212f78c
commit f944b154fc

View file

@ -202,8 +202,18 @@ cmd_shutdown( int socket, const char** args )
static void
print_cookies( int socket, const char* name )
{
CookieID id = CRefMgr::Get()->CookieIdForName( name );
print_cookies( socket, id );
CookieMapIterator iter = CRefMgr::Get()->GetCookieIterator();
CookieID id;
for ( id = iter.Next(); id != 0; id = iter.Next() ) {
SafeCref scr( id );
if ( scr.IsValid() && scr.Name() == name ) {
string s;
scr.PrintCookieInfo( s );
print_to_sock( socket, s.c_str() );
}
}
}
static void