79 |
|
static char *listener_address = NULL; |
80 |
|
static int not_atom = 0; |
81 |
|
|
82 |
< |
struct CollectItem { |
82 |
> |
struct CollectItem |
83 |
> |
{ |
84 |
|
dlink_node node; |
85 |
|
char *name; |
86 |
|
char *user; |
1078 |
|
{ |
1079 |
|
if (ypass == 2) |
1080 |
|
{ |
1081 |
< |
struct CollectItem *yy_tmp; |
1081 |
> |
struct split_nuh_item nuh; |
1082 |
> |
|
1083 |
> |
nuh.nuhmask = yylval.string; |
1084 |
> |
nuh.nickptr = NULL; |
1085 |
> |
nuh.userptr = userbuf; |
1086 |
> |
nuh.hostptr = hostbuf; |
1087 |
> |
|
1088 |
> |
nuh.nicksize = 0; |
1089 |
> |
nuh.usersize = sizeof(userbuf); |
1090 |
> |
nuh.hostsize = sizeof(hostbuf); |
1091 |
> |
|
1092 |
> |
split_nuh(&nuh); |
1093 |
|
|
1094 |
|
if (yy_aconf->user == NULL) |
1095 |
|
{ |
1096 |
< |
split_nuh(yylval.string, NULL, &yy_aconf->user, &yy_aconf->host); |
1096 |
> |
DupString(yy_aconf->user, userbuf); |
1097 |
> |
DupString(yy_aconf->host, hostbuf); |
1098 |
|
} |
1099 |
|
else |
1100 |
|
{ |
1101 |
< |
yy_tmp = (struct CollectItem *)MyMalloc(sizeof(struct CollectItem)); |
1102 |
< |
split_nuh(yylval.string, NULL, &yy_tmp->user, &yy_tmp->host); |
1101 |
> |
struct CollectItem *yy_tmp = MyMalloc(sizeof(struct CollectItem)); |
1102 |
> |
|
1103 |
> |
DupString(yy_tmp->user, userbuf); |
1104 |
> |
DupString(yy_tmp->host, hostbuf); |
1105 |
> |
|
1106 |
|
dlinkAdd(yy_tmp, &yy_tmp->node, &col_conf_list); |
1107 |
|
} |
1108 |
|
} |
1870 |
|
{ |
1871 |
|
if (ypass == 2) |
1872 |
|
{ |
1873 |
< |
struct CollectItem *yy_tmp; |
1873 |
> |
struct CollectItem *yy_tmp = NULL; |
1874 |
> |
struct split_nuh_item nuh; |
1875 |
> |
|
1876 |
> |
nuh.nuhmask = yylval.string; |
1877 |
> |
nuh.nickptr = NULL; |
1878 |
> |
nuh.userptr = userbuf; |
1879 |
> |
nuh.hostptr = hostbuf; |
1880 |
> |
|
1881 |
> |
nuh.nicksize = 0; |
1882 |
> |
nuh.usersize = sizeof(userbuf); |
1883 |
> |
nuh.hostsize = sizeof(hostbuf); |
1884 |
> |
|
1885 |
> |
split_nuh(&nuh); |
1886 |
|
|
1887 |
|
if (yy_aconf->user == NULL) |
1888 |
< |
split_nuh(yylval.string, NULL, &yy_aconf->user, &yy_aconf->host); |
1888 |
> |
{ |
1889 |
> |
DupString(yy_aconf->user, userbuf); |
1890 |
> |
DupString(yy_aconf->host, hostbuf); |
1891 |
> |
} |
1892 |
|
else |
1893 |
|
{ |
1894 |
|
yy_tmp = MyMalloc(sizeof(struct CollectItem)); |
1895 |
< |
split_nuh(yylval.string, NULL, &yy_tmp->user, &yy_tmp->host); |
1895 |
> |
|
1896 |
> |
DupString(yy_tmp->user, userbuf); |
1897 |
> |
DupString(yy_tmp->host, hostbuf); |
1898 |
> |
|
1899 |
|
dlinkAdd(yy_tmp, &yy_tmp->node, &col_conf_list); |
1900 |
|
} |
1901 |
|
} |
2236 |
|
{ |
2237 |
|
if (ypass == 2) |
2238 |
|
{ |
2239 |
< |
split_nuh(yylval.string, NULL, &yy_match_item->user, &yy_match_item->host); |
2239 |
> |
struct split_nuh_item nuh; |
2240 |
> |
|
2241 |
> |
nuh.nuhmask = yylval.string; |
2242 |
> |
nuh.nickptr = NULL; |
2243 |
> |
nuh.userptr = userbuf; |
2244 |
> |
nuh.hostptr = hostbuf; |
2245 |
> |
|
2246 |
> |
nuh.nicksize = 0; |
2247 |
> |
nuh.usersize = sizeof(userbuf); |
2248 |
> |
nuh.hostsize = sizeof(hostbuf); |
2249 |
> |
|
2250 |
> |
split_nuh(&nuh); |
2251 |
> |
|
2252 |
> |
DupString(yy_match_item->user, userbuf); |
2253 |
> |
DupString(yy_match_item->host, hostbuf); |
2254 |
|
} |
2255 |
|
}; |
2256 |
|
|
2427 |
|
yy_aconf->passwd && yy_aconf->spasswd) |
2428 |
|
#endif /* !HAVE_LIBCRYPTO */ |
2429 |
|
{ |
2430 |
< |
if (conf_add_server(yy_conf, scount, class_name) >= 0) |
2383 |
< |
{ |
2384 |
< |
++scount; |
2385 |
< |
} |
2386 |
< |
else |
2430 |
> |
if (conf_add_server(yy_conf, class_name) == -1) |
2431 |
|
{ |
2432 |
|
delete_conf_item(yy_conf); |
2433 |
|
yy_conf = NULL; |
2977 |
|
{ |
2978 |
|
if (ypass == 2) |
2979 |
|
{ |
2980 |
< |
char *user = NULL, *host = NULL; |
2980 |
> |
struct split_nuh_item nuh; |
2981 |
|
|
2982 |
< |
split_nuh(yylval.string, NULL, &user, &host); |
2982 |
> |
nuh.nuhmask = yylval.string; |
2983 |
> |
nuh.nickptr = NULL; |
2984 |
> |
nuh.userptr = userbuf; |
2985 |
> |
nuh.hostptr = hostbuf; |
2986 |
> |
|
2987 |
> |
nuh.nicksize = 0; |
2988 |
> |
nuh.usersize = sizeof(userbuf); |
2989 |
> |
nuh.hostsize = sizeof(hostbuf); |
2990 |
|
|
2991 |
< |
strlcpy(userbuf, user, sizeof(userbuf)); |
2941 |
< |
strlcpy(hostbuf, host, sizeof(hostbuf)); |
2942 |
< |
|
2943 |
< |
MyFree(user); |
2944 |
< |
MyFree(host); |
2991 |
> |
split_nuh(&nuh); |
2992 |
|
} |
2993 |
|
}; |
2994 |
|
|
3707 |
|
{ |
3708 |
|
if (ypass == 2) |
3709 |
|
{ |
3710 |
< |
struct CollectItem *yy_tmp = NULL; |
3710 |
> |
struct split_nuh_item nuh; |
3711 |
> |
|
3712 |
> |
nuh.nuhmask = yylval.string; |
3713 |
> |
nuh.nickptr = NULL; |
3714 |
> |
nuh.userptr = userbuf; |
3715 |
> |
nuh.hostptr = hostbuf; |
3716 |
> |
|
3717 |
> |
nuh.nicksize = 0; |
3718 |
> |
nuh.usersize = sizeof(userbuf); |
3719 |
> |
nuh.hostsize = sizeof(hostbuf); |
3720 |
> |
|
3721 |
> |
split_nuh(&nuh); |
3722 |
|
|
3723 |
|
if (yy_aconf->user == NULL) |
3724 |
|
{ |
3725 |
< |
split_nuh(yylval.string, NULL, &yy_aconf->user, &yy_aconf->host); |
3725 |
> |
DupString(yy_aconf->user, userbuf); |
3726 |
> |
DupString(yy_aconf->host, hostbuf); |
3727 |
|
} |
3728 |
|
else |
3729 |
|
{ |
3730 |
< |
yy_tmp = MyMalloc(sizeof(struct CollectItem)); |
3731 |
< |
split_nuh(yylval.string, NULL, &yy_tmp->user, &yy_tmp->host); |
3730 |
> |
struct CollectItem *yy_tmp = MyMalloc(sizeof(struct CollectItem)); |
3731 |
> |
|
3732 |
> |
DupString(yy_tmp->user, userbuf); |
3733 |
> |
DupString(yy_tmp->host, hostbuf); |
3734 |
> |
|
3735 |
|
dlinkAdd(yy_tmp, &yy_tmp->node, &col_conf_list); |
3736 |
|
} |
3737 |
|
} |