Guest User

Untitled

a guest
Jul 6th, 2012
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.37 KB | None | 0 0
  1.     pthread_mutex_lock(&(data->adata.mutex));
  2.  
  3.     if(xsend(data->adata.socket, size, req, 0) != 0) {
  4.       <handle error>
  5.     }
  6.  
  7.     zmq_msg_init(&zreply);
  8.  
  9.     if(zmq_recv(data->adata.socket, &zreply, 0)  != 0) {
  10.        <handle error>
  11.     }
  12.     else {
  13.         <process response>
  14.     }
  15.  
  16.     pthread_mutex_unlock(&(data->adata.mutex));
  17.  
  18.     return RLM_MODULE_OK;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment