- SERVER '=' server
- {
- if (memcached_server_add_parsed(parser->memc, $3.c_str, $3.length, $3.port, 0) != MEMCACHED_SUCCESS)
- YYERROR;
+ SERVER HOSTNAME optional_port optional_weight
+ {
+ if (memcached_failed(context->rc= memcached_server_add_with_weight(context->memc, $2.c_str, $3, $4)))
+ {
+ parser_abort(context, NULL);
+ }
+ context->unset_server();
+ }
+ | SERVER IPADDRESS optional_port optional_weight
+ {
+ if (memcached_failed(context->rc= memcached_server_add_with_weight(context->memc, $2.c_str, $3, $4)))
+ {
+ parser_abort(context, NULL);
+ }
+ context->unset_server();
+ }
+ | CONFIGURE_FILE string
+ {
+ memcached_set_configuration_file(context->memc, $2.c_str, $2.size);