Browse Source

Fix the GPROC_POOL macro

Feng Lee 9 years ago
parent
commit
0df59934c7
1 changed files with 4 additions and 5 deletions
  1. 4 5
      include/emqttd_internal.hrl

+ 4 - 5
include/emqttd_internal.hrl

@@ -16,19 +16,18 @@
 
 
 %% Internal Header File
 %% Internal Header File
 
 
--define(GPROC_POOL(JoinOrLeave, Pool, I),
+-define(GPROC_POOL(JoinOrLeave, Pool, Id),
         (begin
         (begin
             case JoinOrLeave of
             case JoinOrLeave of
-                join  -> gproc_pool:connect_worker(Pool, {Pool, I});
-                leave -> gproc_pool:disconnect_worker(Pool, {Pool, I})
+                join  -> gproc_pool:connect_worker(Pool, {Pool, Id});
+                leave -> gproc_pool:disconnect_worker(Pool, {Pool, Id})
             end
             end
         end)).
         end)).
 
 
 -define(PROC_NAME(M, I), (list_to_atom(lists:concat([M, "_", I])))).
 -define(PROC_NAME(M, I), (list_to_atom(lists:concat([M, "_", I])))).
 
 
 -define(record_to_proplist(Def, Rec),
 -define(record_to_proplist(Def, Rec),
-        lists:zip(record_info(fields, Def),
-                  tl(tuple_to_list(Rec)))).
+        lists:zip(record_info(fields, Def), tl(tuple_to_list(Rec)))).
 
 
 -define(record_to_proplist(Def, Rec, Fields),
 -define(record_to_proplist(Def, Rec, Fields),
     [{K, V} || {K, V} <- ?record_to_proplist(Def, Rec),
     [{K, V} || {K, V} <- ?record_to_proplist(Def, Rec),