fix add port crash

This commit is contained in:
DNB 2005-12-26 07:07:10 +00:00
parent 8ebc6523d8
commit 8881667a22
2 changed files with 4 additions and 2 deletions

View file

@ -1,5 +1,7 @@
Open Proxy Scanning Bot Module for NeoStats Changelog.
==============================================================================
3.0.b1 - Mark (M) & Fish (F) & DeadNotBuried (D)
- fix crash on adding new port
3.0.a3-dev - Mark (M) & Fish (F)
- AKILL support and open proxy reporting (F)
- Get default targetip when starting up correctly (F)

4
opsb.c
View file

@ -330,8 +330,8 @@ int opsb_cmd_add (const CmdParams *cmdparams)
lnode = list_next(opsb.ports, lnode);
}
pl = ns_malloc(sizeof(port_list));
pl->type = get_proxy_by_name(cmdparams->av[1]);
pl->port = atoi(cmdparams->av[2]);
pl->type = get_proxy_by_name(cmdparams->av[0]);
pl->port = atoi(cmdparams->av[1]);
lnode_create_append(opsb.ports, pl);
list_sort(opsb.ports, ports_sort);