string_type = gras_datadesc_by_name("string");
gras_assert(string_type);
}
-
+
+ DEBUG3("send %s to %s:%d", msgtype->name,
+ gras_socket_peer_name(sock),gras_socket_peer_port(sock));
TRY(gras_trp_chunk_send(sock, GRAS_header, 6));
TRY(gras_datadesc_send(sock, string_type, &msgtype->name));
RAISE2(mismatch_error,"GRAS protocol mismatch (got %d, use %d)",
(int)header[4], (int)GRAS_header[4]);
r_arch = (int)header[5];
- DEBUG2("Handle an incoming message using protocol %d from arch %s",
+ DEBUG2("Handle an incoming message using protocol %d (remote is %s)",
(int)header[4],gras_datadesc_arch_name(r_arch));
TRY(gras_datadesc_recv(sock, string_type, r_arch, &msg_name));
TRY(gras_set_get_by_name(_gras_msgtype_set,
msg_name,(gras_set_elm_t**)msgtype));
-
+ free(msg_name);
*payload_size=gras_datadesc_size((*msgtype)->ctn_type);
gras_assert2(*payload_size > 0,
return mismatch_error;
}
+void
+gras_cbl_free(void *data){
+ gras_cblist_t *list=*(void**)data;
+ if (list) {
+ gras_dynar_free(list->cbs);
+ free(list);
+ }
+}
+
gras_error_t
gras_cb_register(gras_msgtype_t *msgtype,
gras_cb_t cb) {