[OpenDHT-Users] SUN RPC gateway_prot.x VERSION 3
Ronny Klauck
ronny.klauck at googlemail.com
Thu Nov 15 17:17:04 UTC 2007
hi,
i am trying to rewrite the simple-example from opendht.org (http://www.opendht.org/gateway_test.c)
in c which uses VERSION 2 of the get/put/rm interface.
in the new version i use VERSION 3 from the interface in gateway_prot.x, but it seems not to work.
my problem:
i can do a put and oendht and as a result i get a BAMBOO_OK.
when i do a get on the same key, there is nothing on the server. the get is succesful.
the difference fron VERSION 2 to 3 in a put is:
put_args->secret_hash.algorithm = "SHA1";
put_args->secret_hash.hash.hash_len = 4;
put_args->secret_hash.hash.hash_val = "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3";
put_result = bamboo_dht_proc_put_3 (put_args, clnt);
and the new data-typ for the args:
bamboo_put_arguments put_args;
the difference fron VERSION 2 to 3 in a get is:
bamboo_get_args get_args;
bamboo_get_result *get_result;
get_result = bamboo_dht_proc_get_3 (get_args, clnt);
if (get_result->values.values_len >= 1) {
printf ("%s\n", get_result->values.values_val->value.bamboo_value_val);
}
on my point of view, the put does not save anything on the server, because doing a put with VERSION 2 and doing a get
with VERSION 3 i get a "RPC: Can't decode result". so it seems that the get works, but cant read the VERSION 2 of a put,
but thats ok.
regards
ronny
More information about the OpenDHT-Users
mailing list