Fix case where --socket was not always been stored correctly.
[m6w6/libmemcached] / libmemcached / csl / parser.yy
index 21a035264d177c264a9b4577bfd9982e3790af69..d263aea4eca361f7e749e4d55f24e1cf40b2a098 100644 (file)
@@ -133,6 +133,7 @@ inline void __config_error(Context *context, yyscan_t *scanner, const char *erro
 %token _TCP_KEEPALIVE
 %token _TCP_KEEPIDLE
 %token _TCP_NODELAY
+%token FETCH_VERSION
 
 /* Callbacks */
 %token NAMESPACE
@@ -250,7 +251,7 @@ expression:
             if (memcached_failed(context->rc= memcached_server_add_unix_socket_with_weight(context->memc, $2.c_str, $3)))
             {
               char buffer[1024];
-              snprintf(buffer, sizeof(buffer), "Failed to add server: %s", $2.c_str);
+              snprintf(buffer, sizeof(buffer), "Failed to add socket: %s", $2.c_str);
               parser_abort(context, buffer);
             }
           }
@@ -282,6 +283,10 @@ behaviors:
               parser_abort(context, memcached_last_error_message(context->memc));
             }
           }
+        | FETCH_VERSION
+          {
+            memcached_flag(*context->memc, MEMCACHED_FLAG_IS_FETCHING_VERSION, true);
+          }
         | DISTRIBUTION distribution
           {
             // Check to see if DISTRIBUTION has already been set