[Groonga-commit] groonga/groonga at dfca66e [master] suggest: support ZMQ_SNDZMQ in zmq >= 3

Back to archive index

Kouhei Sutou null+****@clear*****
Thu Jul 11 21:28:16 JST 2013


Kouhei Sutou	2013-07-11 21:28:16 +0900 (Thu, 11 Jul 2013)

  New Revision: dfca66e0934bb27b300d183cadfedf0c73ff2361
  https://github.com/groonga/groonga/commit/dfca66e0934bb27b300d183cadfedf0c73ff2361

  Message:
    suggest: support ZMQ_SNDZMQ in zmq >= 3
    
    GitHub: refs #63
    
    See also: http://www.zeromq.org/docs:3-1-upgrade
    
    Reported by Naoya Inada. Thanks!!!
    
        groonga_suggest_learner.c: In function ‘send_to_httpd’:
        groonga_suggest_learner.c:379:41: error: ‘ZMQ_HWM’ undeclared (first use in this function)
                   zmq_setsockopt(zmq_send_sock, ZMQ_HWM, &hwm, sizeof(uint64_t));
                                                 ^
        groonga_suggest_learner.c:379:41: note: each undeclared identifier is reported only once for each function it appears in

  Modified files:
    src/suggest/groonga_suggest_learner.c

  Modified: src/suggest/groonga_suggest_learner.c (+5 -1)
===================================================================
--- src/suggest/groonga_suggest_learner.c    2013-07-11 21:26:21 +0900 (2fe0fb0)
+++ src/suggest/groonga_suggest_learner.c    2013-07-11 21:28:16 +0900 (06f5277)
@@ -30,6 +30,10 @@
 
 #include <evhttp.h>
 
+#ifndef ZMQ_SNDHWM
+#   define ZMQ_SNDHWM ZMQ_HWM
+#endif
+
 #if ZMQ_VERSION_MAJOR == 2
 #  define zmq_msg_send(message, socket, flags) \
   zmq_send((socket), (message), (flags))
@@ -376,7 +380,7 @@ send_to_httpd(void *arg)
         grn_obj *db;
         if ((db = grn_db_open(&ctx, thd->db_path))) {
           uint64_t hwm = 1;
-          zmq_setsockopt(zmq_send_sock, ZMQ_HWM, &hwm, sizeof(uint64_t));
+          zmq_setsockopt(zmq_send_sock, ZMQ_SNDHWM, &hwm, sizeof(uint64_t));
           while (loop) {
             send_handler(zmq_send_sock, &ctx);
           }
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index