/mandos/release

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/release

« back to all changes in this revision

Viewing changes to plugins.d/mandos-client.c

  • Committer: Teddy Hogeborn
  • Date: 2014-03-09 03:02:43 UTC
  • mto: (237.7.272 trunk)
  • mto: This revision was merged to the branch mainline in revision 311.
  • Revision ID: teddy@recompile.se-20140309030243-0gc6l2yuqbzgyuyt
Use getnameinfo() instead of inet_ntop() in mandos-client.

* plugins.d/mandos-client.c (start_mandos_communication): Use
                                                          getnameinfo()
                                                          instead of
                                                          inet_ntop().

Show diffs side-by-side

added added

removed removed

Lines of Context:
232
232
    perror_plus("strdup");
233
233
    return false;
234
234
  }
235
 
  ret = clock_gettime(CLOCK_MONOTONIC, &(new_server->last_seen));
236
 
  if(ret == -1){
237
 
    perror_plus("clock_gettime");
238
 
    return false;
239
 
  }
240
235
  /* Special case of first server */
241
236
  if(*current_server == NULL){
242
237
    new_server->next = new_server;
249
244
    new_server->prev->next = new_server;
250
245
    (*current_server)->prev = new_server;
251
246
  }
 
247
  ret = clock_gettime(CLOCK_MONOTONIC, &(*current_server)->last_seen);
 
248
  if(ret == -1){
 
249
    perror_plus("clock_gettime");
 
250
    return false;
 
251
  }
252
252
  return true;
253
253
}
254
254