Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
High: core: Internal tls api improvements for reuse with future LRMD …
…tls backend.
  • Loading branch information
davidvossel committed Jan 18, 2013
1 parent df60384 commit 564f7cc
Show file tree
Hide file tree
Showing 9 changed files with 939 additions and 460 deletions.
13 changes: 9 additions & 4 deletions cib/callbacks.c
Expand Up @@ -347,13 +347,18 @@ do_local_notify(xmlNode * notify_src, const char *client_id,
int rid = 0;

if(sync_reply) {
CRM_LOG_ASSERT(client_obj->request_id);
if (client_obj->ipc) {
CRM_LOG_ASSERT(client_obj->request_id);

rid = client_obj->request_id;
client_obj->request_id = 0;
rid = client_obj->request_id;
client_obj->request_id = 0;

crm_trace("Sending response %d to %s %s",
crm_trace("Sending response %d to %s %s",
rid, client_obj->name, from_peer?"(originator of delegated request)":"");
} else {
crm_trace("Sending response to %s %s",
client_obj->name, from_peer?"(originator of delegated request)":"");
}

} else {
crm_trace("Sending an event to %s %s",
Expand Down
6 changes: 5 additions & 1 deletion cib/callbacks.h
Expand Up @@ -41,25 +41,29 @@ typedef struct cib_client_s {
char *name;
char *callback_id;
char *user;
char *recv_buf;
int request_id;

qb_ipcs_connection_t *ipc;

#ifdef HAVE_GNUTLS_GNUTLS_H
gnutls_session *session;
gboolean handshake_complete;
#else
void *session;
#endif
gboolean encrypted;
gboolean remote_auth;
mainloop_io_t *remote;

unsigned long num_calls;

int pre_notify;
int post_notify;
int confirmations;
int replace;
int diffs;
int remote_auth_timeout;

GList *delegated_calls;
} cib_client_t;
Expand Down
2 changes: 1 addition & 1 deletion cib/notify.c
Expand Up @@ -83,7 +83,7 @@ cib_notify_client(gpointer key, gpointer value, gpointer user_data)
CRM_CHECK(client != NULL, return TRUE);
CRM_CHECK(update_msg != NULL, return TRUE);

if (client->ipc == NULL) {
if (client->ipc == NULL && client->session == NULL) {
crm_warn("Skipping client with NULL channel");
return FALSE;
}
Expand Down

0 comments on commit 564f7cc

Please sign in to comment.