diff options
Diffstat (limited to 'src/social/gnunet-service-social.c')
-rw-r--r-- | src/social/gnunet-service-social.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/social/gnunet-service-social.c b/src/social/gnunet-service-social.c index 6c57fed31..287047f58 100644 --- a/src/social/gnunet-service-social.c +++ b/src/social/gnunet-service-social.c | |||
@@ -660,7 +660,7 @@ client_send_result (struct GNUNET_SERVER_Client *client, uint64_t op_id, | |||
660 | res->result_code = GNUNET_htonll (result_code); | 660 | res->result_code = GNUNET_htonll (result_code); |
661 | res->op_id = op_id; | 661 | res->op_id = op_id; |
662 | if (0 < data_size) | 662 | if (0 < data_size) |
663 | memcpy (&res[1], data, data_size); | 663 | GNUNET_memcpy (&res[1], data, data_size); |
664 | 664 | ||
665 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 665 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
666 | "%p Sending result to client for operation #%" PRIu64 ": " | 666 | "%p Sending result to client for operation #%" PRIu64 ": " |
@@ -1166,7 +1166,7 @@ app_place_add (const char *app_id, | |||
1166 | 1166 | ||
1167 | size_t app_id_size = strlen (app_id) + 1; | 1167 | size_t app_id_size = strlen (app_id) + 1; |
1168 | void *app_id_value = GNUNET_malloc (app_id_size); | 1168 | void *app_id_value = GNUNET_malloc (app_id_size); |
1169 | memcpy (app_id_value, app_id, app_id_size); | 1169 | GNUNET_memcpy (app_id_value, app_id, app_id_size); |
1170 | 1170 | ||
1171 | if (GNUNET_OK != GNUNET_CONTAINER_multihashmap_put (place_apps, &app_id_hash, app_id_value, | 1171 | if (GNUNET_OK != GNUNET_CONTAINER_multihashmap_put (place_apps, &app_id_hash, app_id_value, |
1172 | GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY)) | 1172 | GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY)) |
@@ -1630,7 +1630,7 @@ guest_enter (const struct GuestEnterRequest *greq, struct Guest **ret_gst) | |||
1630 | if (0 < relay_size) | 1630 | if (0 < relay_size) |
1631 | { | 1631 | { |
1632 | gst->relays = GNUNET_malloc (relay_size); | 1632 | gst->relays = GNUNET_malloc (relay_size); |
1633 | memcpy (gst->relays, relays, relay_size); | 1633 | GNUNET_memcpy (gst->relays, relays, relay_size); |
1634 | } | 1634 | } |
1635 | 1635 | ||
1636 | gst->join_flags = ntohl (greq->flags); | 1636 | gst->join_flags = ntohl (greq->flags); |
@@ -1805,11 +1805,11 @@ gns_result_guest_enter (void *cls, uint32_t rd_count, | |||
1805 | greq->relay_count = rec->relay_count; | 1805 | greq->relay_count = rec->relay_count; |
1806 | 1806 | ||
1807 | void *p = &greq[1]; | 1807 | void *p = &greq[1]; |
1808 | memcpy (p, gcls->app_id, app_id_size); | 1808 | GNUNET_memcpy (p, gcls->app_id, app_id_size); |
1809 | p += app_id_size; | 1809 | p += app_id_size; |
1810 | memcpy (p, relays, relay_size); | 1810 | GNUNET_memcpy (p, relays, relay_size); |
1811 | p += relay_size; | 1811 | p += relay_size; |
1812 | memcpy (p, gcls->join_msg, join_msg_size); | 1812 | GNUNET_memcpy (p, gcls->join_msg, join_msg_size); |
1813 | 1813 | ||
1814 | client_recv_guest_enter (NULL, gcls->client, &greq->header); | 1814 | client_recv_guest_enter (NULL, gcls->client, &greq->header); |
1815 | 1815 | ||
@@ -1867,13 +1867,13 @@ client_recv_guest_enter_by_name (void *cls, struct GNUNET_SERVER_Client *client, | |||
1867 | 1867 | ||
1868 | uint16_t app_id_size = strlen (app_id) + 1; | 1868 | uint16_t app_id_size = strlen (app_id) + 1; |
1869 | gcls->app_id = GNUNET_malloc (app_id_size); | 1869 | gcls->app_id = GNUNET_malloc (app_id_size); |
1870 | memcpy (gcls->app_id, app_id, app_id_size); | 1870 | GNUNET_memcpy (gcls->app_id, app_id, app_id_size); |
1871 | 1871 | ||
1872 | uint16_t password_size = strlen (password); | 1872 | uint16_t password_size = strlen (password); |
1873 | if (0 < password_size++) | 1873 | if (0 < password_size++) |
1874 | { | 1874 | { |
1875 | gcls->password = GNUNET_malloc (password_size); | 1875 | gcls->password = GNUNET_malloc (password_size); |
1876 | memcpy (gcls->password, password, password_size); | 1876 | GNUNET_memcpy (gcls->password, password, password_size); |
1877 | } | 1877 | } |
1878 | 1878 | ||
1879 | GNUNET_GNS_lookup (gns, gns_name, &greq->ego_pub_key, | 1879 | GNUNET_GNS_lookup (gns, gns_name, &greq->ego_pub_key, |
@@ -1953,7 +1953,7 @@ app_notify_ego (struct Ego *ego, struct GNUNET_SERVER_Client *client) | |||
1953 | emsg->header.size = htons (sizeof (*emsg) + name_size); | 1953 | emsg->header.size = htons (sizeof (*emsg) + name_size); |
1954 | 1954 | ||
1955 | GNUNET_CRYPTO_ecdsa_key_get_public (&ego->key, &emsg->ego_pub_key); | 1955 | GNUNET_CRYPTO_ecdsa_key_get_public (&ego->key, &emsg->ego_pub_key); |
1956 | memcpy (&emsg[1], ego->name, name_size); | 1956 | GNUNET_memcpy (&emsg[1], ego->name, name_size); |
1957 | 1957 | ||
1958 | client_send_msg (client, &emsg->header); | 1958 | client_send_msg (client, &emsg->header); |
1959 | GNUNET_free (emsg); | 1959 | GNUNET_free (emsg); |
@@ -2043,7 +2043,7 @@ client_recv_app_connect (void *cls, struct GNUNET_SERVER_Client *client, | |||
2043 | 2043 | ||
2044 | struct Client *ctx = GNUNET_new (struct Client); | 2044 | struct Client *ctx = GNUNET_new (struct Client); |
2045 | ctx->app_id = GNUNET_malloc (app_id_size); | 2045 | ctx->app_id = GNUNET_malloc (app_id_size); |
2046 | memcpy (ctx->app_id, app_id, app_id_size); | 2046 | GNUNET_memcpy (ctx->app_id, app_id, app_id_size); |
2047 | 2047 | ||
2048 | GNUNET_SERVER_client_set_user_context (client, ctx); | 2048 | GNUNET_SERVER_client_set_user_context (client, ctx); |
2049 | GNUNET_SERVER_receive_done (client, GNUNET_OK); | 2049 | GNUNET_SERVER_receive_done (client, GNUNET_OK); |
@@ -2319,7 +2319,7 @@ psyc_transmit_notify_data (void *cls, uint16_t *data_size, void *data) | |||
2319 | plc, pdata_size); | 2319 | plc, pdata_size); |
2320 | 2320 | ||
2321 | *data_size = pdata_size; | 2321 | *data_size = pdata_size; |
2322 | memcpy (data, &pmsg[1], *data_size); | 2322 | GNUNET_memcpy (data, &pmsg[1], *data_size); |
2323 | ret = GNUNET_NO; | 2323 | ret = GNUNET_NO; |
2324 | break; | 2324 | break; |
2325 | 2325 | ||
@@ -2454,7 +2454,7 @@ psyc_transmit_notify_mod (void *cls, uint16_t *data_size, void *data, | |||
2454 | *full_value_size = ntohl (pmod->value_size); | 2454 | *full_value_size = ntohl (pmod->value_size); |
2455 | *oper = pmod->oper; | 2455 | *oper = pmod->oper; |
2456 | *data_size = mod_size; | 2456 | *data_size = mod_size; |
2457 | memcpy (data, &pmod[1], mod_size); | 2457 | GNUNET_memcpy (data, &pmod[1], mod_size); |
2458 | ret = GNUNET_NO; | 2458 | ret = GNUNET_NO; |
2459 | break; | 2459 | break; |
2460 | } | 2460 | } |
@@ -2480,7 +2480,7 @@ psyc_transmit_notify_mod (void *cls, uint16_t *data_size, void *data, | |||
2480 | "%p psyc_transmit_notify_mod: sending %u bytes.\n", plc, mod_size); | 2480 | "%p psyc_transmit_notify_mod: sending %u bytes.\n", plc, mod_size); |
2481 | 2481 | ||
2482 | *data_size = mod_size; | 2482 | *data_size = mod_size; |
2483 | memcpy (data, &pmsg[1], *data_size); | 2483 | GNUNET_memcpy (data, &pmsg[1], *data_size); |
2484 | ret = GNUNET_NO; | 2484 | ret = GNUNET_NO; |
2485 | break; | 2485 | break; |
2486 | } | 2486 | } |
@@ -2760,7 +2760,7 @@ psyc_transmit_queue_message (struct Place *plc, | |||
2760 | 2760 | ||
2761 | struct FragmentTransmitQueue * | 2761 | struct FragmentTransmitQueue * |
2762 | tmit_frag = GNUNET_malloc (sizeof (*tmit_frag) + data_size); | 2762 | tmit_frag = GNUNET_malloc (sizeof (*tmit_frag) + data_size); |
2763 | memcpy (&tmit_frag[1], data, data_size); | 2763 | GNUNET_memcpy (&tmit_frag[1], data, data_size); |
2764 | tmit_frag->next_part = (struct GNUNET_MessageHeader *) &tmit_frag[1]; | 2764 | tmit_frag->next_part = (struct GNUNET_MessageHeader *) &tmit_frag[1]; |
2765 | tmit_frag->client = client; | 2765 | tmit_frag->client = client; |
2766 | tmit_frag->size = data_size; | 2766 | tmit_frag->size = data_size; |
@@ -2893,7 +2893,7 @@ psyc_recv_history_message (void *cls, const struct GNUNET_PSYC_MessageHeader *ms | |||
2893 | res->op_id = opcls->op_id; | 2893 | res->op_id = opcls->op_id; |
2894 | res->result_code = GNUNET_htonll (GNUNET_OK); | 2894 | res->result_code = GNUNET_htonll (GNUNET_OK); |
2895 | 2895 | ||
2896 | memcpy (&res[1], msg, size); | 2896 | GNUNET_memcpy (&res[1], msg, size); |
2897 | 2897 | ||
2898 | /** @todo FIXME: send only to requesting client */ | 2898 | /** @todo FIXME: send only to requesting client */ |
2899 | place_send_msg (plc, &res->header); | 2899 | place_send_msg (plc, &res->header); |
@@ -3001,7 +3001,7 @@ psyc_recv_state_var (void *cls, | |||
3001 | res->op_id = opcls->op_id; | 3001 | res->op_id = opcls->op_id; |
3002 | res->result_code = GNUNET_htonll (GNUNET_OK); | 3002 | res->result_code = GNUNET_htonll (GNUNET_OK); |
3003 | 3003 | ||
3004 | memcpy (&res[1], mod, size); | 3004 | GNUNET_memcpy (&res[1], mod, size); |
3005 | 3005 | ||
3006 | /** @todo FIXME: send only to requesting client */ | 3006 | /** @todo FIXME: send only to requesting client */ |
3007 | place_send_msg (plc, &res->header); | 3007 | place_send_msg (plc, &res->header); |
@@ -3139,7 +3139,7 @@ client_recv_zone_add_place (void *cls, struct GNUNET_SERVER_Client *client, | |||
3139 | rec->place_pub_key = preq->place_pub_key; | 3139 | rec->place_pub_key = preq->place_pub_key; |
3140 | rec->origin = this_peer; | 3140 | rec->origin = this_peer; |
3141 | rec->relay_count = preq->relay_count; | 3141 | rec->relay_count = preq->relay_count; |
3142 | memcpy (&rec[1], relays, relay_size); | 3142 | GNUNET_memcpy (&rec[1], relays, relay_size); |
3143 | 3143 | ||
3144 | rd.data = rec; | 3144 | rd.data = rec; |
3145 | rd.data_size = sizeof (*rec) + relay_size; | 3145 | rd.data_size = sizeof (*rec) + relay_size; |
@@ -3439,7 +3439,7 @@ identity_recv_ego (void *cls, struct GNUNET_IDENTITY_Ego *id_ego, | |||
3439 | ego->key = *(GNUNET_IDENTITY_ego_get_private_key (id_ego)); | 3439 | ego->key = *(GNUNET_IDENTITY_ego_get_private_key (id_ego)); |
3440 | size_t name_size = strlen (name) + 1; | 3440 | size_t name_size = strlen (name) + 1; |
3441 | ego->name = GNUNET_malloc (name_size); | 3441 | ego->name = GNUNET_malloc (name_size); |
3442 | memcpy (ego->name, name, name_size); | 3442 | GNUNET_memcpy (ego->name, name, name_size); |
3443 | 3443 | ||
3444 | GNUNET_CONTAINER_multihashmap_put (egos, &ego_pub_hash, ego, | 3444 | GNUNET_CONTAINER_multihashmap_put (egos, &ego_pub_hash, ego, |
3445 | GNUNET_CONTAINER_MULTIHASHMAPOPTION_REPLACE); | 3445 | GNUNET_CONTAINER_MULTIHASHMAPOPTION_REPLACE); |