Beispiel #1
0
CORBA_long onewaytest_longstring(onewaytest _obj, CORBA_char **x, CORBA_Environment *_ev)
{
	printf("onewaytest_longstring Received InOut %s: Onewaytest",*x);
	CORBA_free(*x);
        alloc_strcpy(*x, "Fabulous!", _ev);
	return 21;
}
Beispiel #2
0
CORBA_char *onewaytest_stringreturn(onewaytest _obj, CORBA_Environment *_ev)
{
	char *result;
	printf("onewaytest_stringreturn Sending Hello World.\n");

	alloc_strcpy(result, "Hello World", _ev);
	return result;
}
Beispiel #3
0
CORBA_char *onewaytest_stringlong(onewaytest _obj, CORBA_long *x, CORBA_Environment *_ev)
{
	char *result;
	*x = 957;
	printf("onewaytest_stringlong sending Out %d and Out 'My House Number'.\n",*x);
	alloc_strcpy(result, "My House Number", _ev);
	return result;
}
Beispiel #4
0
int rms_meta_peer_init(rms_meta_peer **peer, char* hostname, unsigned long id) {
	(*peer) = (rms_meta_peer *)malloc(sizeof(rms_meta_peer));
	(*peer)->id = id;
	alloc_strcpy(&(*peer)->hostname, hostname);
	(*peer)->sequence_sent = 0;
	(*peer)->sequence_rcvd = 0;
	(*peer)->sequence_sync = 0;
	(*peer)->lost 		  = 0;
	(*peer)->last_hbeat.tv_sec = 0;
	(*peer)->last_hbeat.tv_usec = 0;
	htbl_init(&(*peer)->ht_unseq_msgs, 10, 0);
	return 0;
}