diff options
Diffstat (limited to 'src/conversation')
-rw-r--r-- | src/conversation/conversation_api.c | 2 | ||||
-rw-r--r-- | src/conversation/conversation_api_call.c | 4 | ||||
-rw-r--r-- | src/conversation/gnunet-conversation-test.c | 2 | ||||
-rw-r--r-- | src/conversation/gnunet-helper-audio-playback.c | 6 | ||||
-rw-r--r-- | src/conversation/gnunet-helper-audio-record.c | 16 | ||||
-rw-r--r-- | src/conversation/gnunet-service-conversation.c | 6 | ||||
-rw-r--r-- | src/conversation/gnunet_gst.c | 2 | ||||
-rw-r--r-- | src/conversation/speaker.c | 2 |
8 files changed, 20 insertions, 20 deletions
diff --git a/src/conversation/conversation_api.c b/src/conversation/conversation_api.c index e3bab295e..3c0a68f4f 100644 --- a/src/conversation/conversation_api.c +++ b/src/conversation/conversation_api.c | |||
@@ -238,7 +238,7 @@ transmit_phone_audio (void *cls, | |||
238 | data_size, | 238 | data_size, |
239 | GNUNET_MESSAGE_TYPE_CONVERSATION_CS_AUDIO); | 239 | GNUNET_MESSAGE_TYPE_CONVERSATION_CS_AUDIO); |
240 | am->cid = caller->cid; | 240 | am->cid = caller->cid; |
241 | memcpy (&am[1], data, data_size); | 241 | GNUNET_memcpy (&am[1], data, data_size); |
242 | GNUNET_MQ_send (phone->mq, e); | 242 | GNUNET_MQ_send (phone->mq, e); |
243 | } | 243 | } |
244 | 244 | ||
diff --git a/src/conversation/conversation_api_call.c b/src/conversation/conversation_api_call.c index ad83288b9..cd1bf8f86 100644 --- a/src/conversation/conversation_api_call.c +++ b/src/conversation/conversation_api_call.c | |||
@@ -177,7 +177,7 @@ transmit_call_audio (void *cls, | |||
177 | e = GNUNET_MQ_msg_extra (am, | 177 | e = GNUNET_MQ_msg_extra (am, |
178 | data_size, | 178 | data_size, |
179 | GNUNET_MESSAGE_TYPE_CONVERSATION_CS_AUDIO); | 179 | GNUNET_MESSAGE_TYPE_CONVERSATION_CS_AUDIO); |
180 | memcpy (&am[1], data, data_size); | 180 | GNUNET_memcpy (&am[1], data, data_size); |
181 | GNUNET_MQ_send (call->mq, e); | 181 | GNUNET_MQ_send (call->mq, e); |
182 | } | 182 | } |
183 | 183 | ||
@@ -442,7 +442,7 @@ handle_gns_response (void *cls, | |||
442 | GNUNET_break_op (0); | 442 | GNUNET_break_op (0); |
443 | continue; | 443 | continue; |
444 | } | 444 | } |
445 | memcpy (&call->phone_record, | 445 | GNUNET_memcpy (&call->phone_record, |
446 | rd[i].data, | 446 | rd[i].data, |
447 | rd[i].data_size); | 447 | rd[i].data_size); |
448 | e = GNUNET_MQ_msg (ccm, GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_CALL); | 448 | e = GNUNET_MQ_msg (ccm, GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_CALL); |
diff --git a/src/conversation/gnunet-conversation-test.c b/src/conversation/gnunet-conversation-test.c index 815c7ef11..804df4c88 100644 --- a/src/conversation/gnunet-conversation-test.c +++ b/src/conversation/gnunet-conversation-test.c | |||
@@ -178,7 +178,7 @@ record (void *cls, | |||
178 | (unsigned int) data_size); | 178 | (unsigned int) data_size); |
179 | rec = GNUNET_malloc (sizeof (struct Recording) + data_size); | 179 | rec = GNUNET_malloc (sizeof (struct Recording) + data_size); |
180 | rec->size = data_size; | 180 | rec->size = data_size; |
181 | memcpy (&rec[1], data, data_size); | 181 | GNUNET_memcpy (&rec[1], data, data_size); |
182 | GNUNET_CONTAINER_DLL_insert_tail (rec_head, | 182 | GNUNET_CONTAINER_DLL_insert_tail (rec_head, |
183 | rec_tail, | 183 | rec_tail, |
184 | rec); | 184 | rec); |
diff --git a/src/conversation/gnunet-helper-audio-playback.c b/src/conversation/gnunet-helper-audio-playback.c index 77529e3b5..e965cb2aa 100644 --- a/src/conversation/gnunet-helper-audio-playback.c +++ b/src/conversation/gnunet-helper-audio-playback.c | |||
@@ -151,7 +151,7 @@ process_header (ogg_packet *op) | |||
151 | 151 | ||
152 | if (op->bytes < sizeof (header)) | 152 | if (op->bytes < sizeof (header)) |
153 | return NULL; | 153 | return NULL; |
154 | memcpy (&header, op->packet, sizeof (header)); | 154 | GNUNET_memcpy (&header, op->packet, sizeof (header)); |
155 | header.preskip = GNUNET_le16toh (header.preskip); | 155 | header.preskip = GNUNET_le16toh (header.preskip); |
156 | header.sampling_rate = GNUNET_le32toh (header.sampling_rate); | 156 | header.sampling_rate = GNUNET_le32toh (header.sampling_rate); |
157 | header.gain = GNUNET_le16toh (header.gain); | 157 | header.gain = GNUNET_le16toh (header.gain); |
@@ -565,7 +565,7 @@ stdin_receiver (void *cls, | |||
565 | /*Get the ogg buffer for writing*/ | 565 | /*Get the ogg buffer for writing*/ |
566 | data = ogg_sync_buffer (&oy, payload_len); | 566 | data = ogg_sync_buffer (&oy, payload_len); |
567 | /*Read bitstream from input file*/ | 567 | /*Read bitstream from input file*/ |
568 | memcpy (data, (const unsigned char *) &audio[1], payload_len); | 568 | GNUNET_memcpy (data, (const unsigned char *) &audio[1], payload_len); |
569 | ogg_sync_wrote (&oy, payload_len); | 569 | ogg_sync_wrote (&oy, payload_len); |
570 | 570 | ||
571 | ogg_demux_and_decode (); | 571 | ogg_demux_and_decode (); |
@@ -796,7 +796,7 @@ main (int argc, char *argv[]) | |||
796 | if (read_pure_ogg) | 796 | if (read_pure_ogg) |
797 | { | 797 | { |
798 | char *data = ogg_sync_buffer (&oy, ret); | 798 | char *data = ogg_sync_buffer (&oy, ret); |
799 | memcpy (data, readbuf, ret); | 799 | GNUNET_memcpy (data, readbuf, ret); |
800 | ogg_sync_wrote (&oy, ret); | 800 | ogg_sync_wrote (&oy, ret); |
801 | ogg_demux_and_decode (); | 801 | ogg_demux_and_decode (); |
802 | } | 802 | } |
diff --git a/src/conversation/gnunet-helper-audio-record.c b/src/conversation/gnunet-helper-audio-record.c index 73f4cfda3..82bb6d5b3 100644 --- a/src/conversation/gnunet-helper-audio-record.c +++ b/src/conversation/gnunet-helper-audio-record.c | |||
@@ -300,8 +300,8 @@ write_page (ogg_page *og) | |||
300 | size_t msg_size; | 300 | size_t msg_size; |
301 | msg_size = sizeof (struct AudioMessage) + og->header_len + og->body_len; | 301 | msg_size = sizeof (struct AudioMessage) + og->header_len + og->body_len; |
302 | audio_message->header.size = htons ((uint16_t) msg_size); | 302 | audio_message->header.size = htons ((uint16_t) msg_size); |
303 | memcpy (&audio_message[1], og->header, og->header_len); | 303 | GNUNET_memcpy (&audio_message[1], og->header, og->header_len); |
304 | memcpy (((char *) &audio_message[1]) + og->header_len, og->body, og->body_len); | 304 | GNUNET_memcpy (((char *) &audio_message[1]) + og->header_len, og->body, og->body_len); |
305 | 305 | ||
306 | toff += msg_size; | 306 | toff += msg_size; |
307 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 307 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
@@ -330,7 +330,7 @@ packetizer () | |||
330 | 330 | ||
331 | while (transmit_buffer_length >= transmit_buffer_index + pcm_length) | 331 | while (transmit_buffer_length >= transmit_buffer_index + pcm_length) |
332 | { | 332 | { |
333 | memcpy (pcm_buffer, | 333 | GNUNET_memcpy (pcm_buffer, |
334 | &transmit_buffer[transmit_buffer_index], | 334 | &transmit_buffer[transmit_buffer_index], |
335 | pcm_length); | 335 | pcm_length); |
336 | transmit_buffer_index += pcm_length; | 336 | transmit_buffer_index += pcm_length; |
@@ -428,7 +428,7 @@ stream_read_callback (pa_stream * s, | |||
428 | { | 428 | { |
429 | transmit_buffer = pa_xrealloc (transmit_buffer, | 429 | transmit_buffer = pa_xrealloc (transmit_buffer, |
430 | transmit_buffer_length + length); | 430 | transmit_buffer_length + length); |
431 | memcpy (&transmit_buffer[transmit_buffer_length], | 431 | GNUNET_memcpy (&transmit_buffer[transmit_buffer_length], |
432 | data, | 432 | data, |
433 | length); | 433 | length); |
434 | transmit_buffer_length += length; | 434 | transmit_buffer_length += length; |
@@ -436,7 +436,7 @@ stream_read_callback (pa_stream * s, | |||
436 | else | 436 | else |
437 | { | 437 | { |
438 | transmit_buffer = pa_xmalloc (length); | 438 | transmit_buffer = pa_xmalloc (length); |
439 | memcpy (transmit_buffer, data, length); | 439 | GNUNET_memcpy (transmit_buffer, data, length); |
440 | transmit_buffer_length = length; | 440 | transmit_buffer_length = length; |
441 | transmit_buffer_index = 0; | 441 | transmit_buffer_index = 0; |
442 | } | 442 | } |
@@ -686,7 +686,7 @@ ogg_init () | |||
686 | const char *opusver; | 686 | const char *opusver; |
687 | int vendor_length; | 687 | int vendor_length; |
688 | 688 | ||
689 | memcpy (headpacket.magic, "OpusHead", 8); | 689 | GNUNET_memcpy (headpacket.magic, "OpusHead", 8); |
690 | headpacket.version = 1; | 690 | headpacket.version = 1; |
691 | headpacket.channels = CHANNELS; | 691 | headpacket.channels = CHANNELS; |
692 | headpacket.preskip = GNUNET_htole16 (0); | 692 | headpacket.preskip = GNUNET_htole16 (0); |
@@ -723,9 +723,9 @@ ogg_init () | |||
723 | exit (5); | 723 | exit (5); |
724 | } | 724 | } |
725 | 725 | ||
726 | memcpy (commentspacket->magic, "OpusTags", 8); | 726 | GNUNET_memcpy (commentspacket->magic, "OpusTags", 8); |
727 | commentspacket->vendor_length = GNUNET_htole32 (vendor_length); | 727 | commentspacket->vendor_length = GNUNET_htole32 (vendor_length); |
728 | memcpy (&commentspacket[1], opusver, vendor_length); | 728 | GNUNET_memcpy (&commentspacket[1], opusver, vendor_length); |
729 | *(uint32_t *) &((char *) &commentspacket[1])[vendor_length] = \ | 729 | *(uint32_t *) &((char *) &commentspacket[1])[vendor_length] = \ |
730 | GNUNET_htole32 (0); /* no tags */ | 730 | GNUNET_htole32 (0); /* no tags */ |
731 | 731 | ||
diff --git a/src/conversation/gnunet-service-conversation.c b/src/conversation/gnunet-service-conversation.c index 3b2237229..dcef0f18b 100644 --- a/src/conversation/gnunet-service-conversation.c +++ b/src/conversation/gnunet-service-conversation.c | |||
@@ -774,7 +774,7 @@ transmit_line_audio (void *cls, | |||
774 | mam->header.type = htons (GNUNET_MESSAGE_TYPE_CONVERSATION_CADET_AUDIO); | 774 | mam->header.type = htons (GNUNET_MESSAGE_TYPE_CONVERSATION_CADET_AUDIO); |
775 | mam->remote_line = htonl (ch->remote_line); | 775 | mam->remote_line = htonl (ch->remote_line); |
776 | mam->source_line = htonl (ch->line->local_line); | 776 | mam->source_line = htonl (ch->line->local_line); |
777 | memcpy (&mam[1], ch->audio_data, ch->audio_size); | 777 | GNUNET_memcpy (&mam[1], ch->audio_data, ch->audio_size); |
778 | GNUNET_free (ch->audio_data); | 778 | GNUNET_free (ch->audio_data); |
779 | ch->audio_data = NULL; | 779 | ch->audio_data = NULL; |
780 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 780 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
@@ -869,7 +869,7 @@ handle_client_audio_message (void *cls, | |||
869 | } | 869 | } |
870 | ch->audio_size = size; | 870 | ch->audio_size = size; |
871 | ch->audio_data = GNUNET_malloc (ch->audio_size); | 871 | ch->audio_data = GNUNET_malloc (ch->audio_size); |
872 | memcpy (ch->audio_data, | 872 | GNUNET_memcpy (ch->audio_data, |
873 | &msg[1], | 873 | &msg[1], |
874 | size); | 874 | size); |
875 | ch->unreliable_mth = GNUNET_CADET_notify_transmit_ready (ch->channel_unreliable, | 875 | ch->unreliable_mth = GNUNET_CADET_notify_transmit_ready (ch->channel_unreliable, |
@@ -1328,7 +1328,7 @@ handle_cadet_audio_message (void *cls, | |||
1328 | cam->header.size = htons (sizeof (buf)); | 1328 | cam->header.size = htons (sizeof (buf)); |
1329 | cam->header.type = htons (GNUNET_MESSAGE_TYPE_CONVERSATION_CS_AUDIO); | 1329 | cam->header.type = htons (GNUNET_MESSAGE_TYPE_CONVERSATION_CS_AUDIO); |
1330 | cam->cid = ch->cid; | 1330 | cam->cid = ch->cid; |
1331 | memcpy (&cam[1], &msg[1], msize); | 1331 | GNUNET_memcpy (&cam[1], &msg[1], msize); |
1332 | GNUNET_SERVER_notification_context_unicast (nc, | 1332 | GNUNET_SERVER_notification_context_unicast (nc, |
1333 | ch->line->client, | 1333 | ch->line->client, |
1334 | &cam->header, | 1334 | &cam->header, |
diff --git a/src/conversation/gnunet_gst.c b/src/conversation/gnunet_gst.c index a9f6bb8d7..91c6ddccb 100644 --- a/src/conversation/gnunet_gst.c +++ b/src/conversation/gnunet_gst.c | |||
@@ -196,7 +196,7 @@ on_appsink_new_sample (GstElement * element, GNUNET_gstData * d) | |||
196 | msg_size = sizeof (struct AudioMessage) + len; | 196 | msg_size = sizeof (struct AudioMessage) + len; |
197 | 197 | ||
198 | // copy the data into audio_message | 198 | // copy the data into audio_message |
199 | memcpy (((char *) &(d->audio_message)[1]), map.data, len); | 199 | GNUNET_memcpy (((char *) &(d->audio_message)[1]), map.data, len); |
200 | /* | 200 | /* |
201 | toff += msg_size; | 201 | toff += msg_size; |
202 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 202 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
diff --git a/src/conversation/speaker.c b/src/conversation/speaker.c index 7467f8e28..deff9e319 100644 --- a/src/conversation/speaker.c +++ b/src/conversation/speaker.c | |||
@@ -141,7 +141,7 @@ play (void *cls, | |||
141 | am = (struct AudioMessage *) buf; | 141 | am = (struct AudioMessage *) buf; |
142 | am->header.size = htons (sizeof (struct AudioMessage) + data_size); | 142 | am->header.size = htons (sizeof (struct AudioMessage) + data_size); |
143 | am->header.type = htons (GNUNET_MESSAGE_TYPE_CONVERSATION_AUDIO); | 143 | am->header.type = htons (GNUNET_MESSAGE_TYPE_CONVERSATION_AUDIO); |
144 | memcpy (&am[1], data, data_size); | 144 | GNUNET_memcpy (&am[1], data, data_size); |
145 | (void) GNUNET_HELPER_send (spe->playback_helper, | 145 | (void) GNUNET_HELPER_send (spe->playback_helper, |
146 | &am->header, | 146 | &am->header, |
147 | GNUNET_NO, | 147 | GNUNET_NO, |