On Thu, 15 Apr 2010 11:07:00 -0300 Miguel Di Ciurcio Filho <miguel.fi...@gmail.com> wrote:
> Signed-off-by: Miguel Di Ciurcio Filho <miguel.fi...@gmail.com> > --- > net/slirp.c | 8 ++++++-- > 1 files changed, 6 insertions(+), 2 deletions(-) > > diff --git a/net/slirp.c b/net/slirp.c > index b41c60a..eb9d261 100644 > --- a/net/slirp.c > +++ b/net/slirp.c > @@ -32,6 +32,9 @@ > #include "monitor.h" > #include "sysemu.h" > #include "qemu_socket.h" > +#include "qdict.h" > +#include "qbool.h" > +#include "qstring.h" > #include "slirp/libslirp.h" > > static int get_str_sep(char *buf, int buf_size, const char **pp, int sep) > @@ -240,8 +243,9 @@ static int net_slirp_init(VLANState *vlan, const char > *model, > > nc = qemu_new_net_client(&net_slirp_info, vlan, NULL, model, name); > > - snprintf(nc->info_str, sizeof(nc->info_str), > - "net=%s, restricted=%c", inet_ntoa(net), restricted ? 'y' : > 'n'); > + nc->info_dict = qdict_new(); > + qdict_put(nc->info_dict, "net", qstring_from_str(inet_ntoa(net))); > + qdict_put(nc->info_dict, "restricted", qbool_from_int(restricted)); This is going to be freed by qemu_del_vlan_client(), right? > > s = DO_UPCAST(SlirpState, nc, nc); >