OpenCores
URL https://opencores.org/ocsvn/funbase_ip_library/funbase_ip_library/trunk

Subversion Repositories funbase_ip_library

[/] [funbase_ip_library/] [trunk/] [TUT/] [ip.swp.api/] [openmcapi/] [1.0/] [test/] [func/] [fts_mcapi_pktchan_recv_i.c] - Blame information for rev 145

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 145 lanttu
/*
2
 * Copyright (c) 2010, Mentor Graphics Corporation
3
 * All rights reserved.
4
 *
5
 * Redistribution and use in source and binary forms, with or without
6
 * modification, are permitted provided that the following conditions are met:
7
 *
8
 * 1. Redistributions of source code must retain the above copyright notice,
9
 *    this list of conditions and the following disclaimer.
10
 * 2. Redistributions in binary form must reproduce the above copyright notice,
11
 *    this list of conditions and the following disclaimer in the documentation
12
 *    and/or other materials provided with the distribution.
13
 * 3. Neither the name of the <ORGANIZATION> nor the names of its contributors
14
 *    may be used to endorse or promote products derived from this software
15
 *    without specific prior written permission.
16
 *
17
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
21
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27
 * POSSIBILITY OF SUCH DAMAGE.
28
 */
29
 
30
/*
31
*   FILENAME
32
*
33
*       fts_main.c
34
*
35
*
36
*************************************************************************/
37
 
38
#include "fts_defs.h"
39
#include "support_suite/mcapid_support.h"
40
 
41
extern MCAPI_MUTEX      MCAPID_FTS_Mutex;
42
 
43
/************************************************************************
44
*
45
*   FUNCTION
46
*
47
*       MCAPI_FTS_Tx_2_19_1
48
*
49
*   DESCRIPTION
50
*
51
*       Testing mcapi_pktchan_recv_i - receive data over open connection.
52
*
53
*           Node 0 – Create endpoint, open send side, wait for connection,
54
*                    send data
55
*
56
*           Node 1 – Create endpoint, open receive side, get endpoint on
57
*                    Node 0, open connection, wait for data
58
*
59
*************************************************************************/
60
MCAPI_THREAD_ENTRY(MCAPI_FTS_Tx_2_19_1)
61
{
62
    MCAPID_STRUCT               *mcapi_struct = (MCAPID_STRUCT*)argv;
63
    size_t                      rx_len;
64
    mcapi_status_t              status;
65
    mcapi_endpoint_t            tx_endp, rx_endp;
66
    mcapi_request_t             request;
67
    char                        *buffer;
68
 
69
    /* Don't let any other test run while this test is running. */
70
    MCAPI_Obtain_Mutex(&MCAPID_FTS_Mutex);
71
 
72
    /* An extra endpoint is required for the connection. */
73
    rx_endp = mcapi_create_endpoint(MCAPI_PORT_ANY, &mcapi_struct->status);
74
 
75
    if (mcapi_struct->status == MCAPI_SUCCESS)
76
    {
77
        /* Indicate that a remote endpoint should be created. */
78
        mcapi_struct->status =
79
            MCAPID_TX_Mgmt_Message(mcapi_struct, MCAPID_MGMT_CREATE_ENDP, 1024,
80
                                   mcapi_struct->local_endp, 0, MCAPI_DEFAULT_PRIO);
81
 
82
        if (mcapi_struct->status == MCAPI_SUCCESS)
83
        {
84
            /* Wait for a response. */
85
            mcapi_struct->status = MCAPID_RX_Mgmt_Response(mcapi_struct);
86
 
87
            /* If the endpoint was created. */
88
            if (mcapi_struct->status == MCAPI_SUCCESS)
89
            {
90
                /* Indicate that the endpoint should be opened as a sender. */
91
                mcapi_struct->status =
92
                    MCAPID_TX_Mgmt_Message(mcapi_struct, MCAPID_MGMT_OPEN_TX_SIDE_PKT,
93
                                           1024, mcapi_struct->local_endp, 0, MCAPI_DEFAULT_PRIO);
94
 
95
                if (mcapi_struct->status == MCAPI_SUCCESS)
96
                {
97
                    /* Wait for a response. */
98
                    mcapi_struct->status = MCAPID_RX_Mgmt_Response(mcapi_struct);
99
 
100
                    /* If the receive side was opened. */
101
                    if (mcapi_struct->status ==MGC_MCAPI_ERR_NOT_CONNECTED)
102
                    {
103
                        /* Get the send side endpoint. */
104
                        tx_endp = mcapi_get_endpoint(FUNC_BACKEND_NODE_ID, 1024, &mcapi_struct->status);
105
 
106
                        if (mcapi_struct->status == MCAPI_SUCCESS)
107
                        {
108
                            /* Connect the two endpoints. */
109
                            mcapi_connect_pktchan_i(tx_endp, rx_endp,
110
                                                    &mcapi_struct->request,
111
                                                    &mcapi_struct->status);
112
 
113
                            if (mcapi_struct->status == MCAPI_SUCCESS)
114
                            {
115
                                /* Wait for the open to return successfully. */
116
                                mcapi_wait(&mcapi_struct->request, &rx_len,
117
                                           &mcapi_struct->status, MCAPI_FTS_TIMEOUT);
118
 
119
                                /* Open the local endpoint as the receiver. */
120
                                mcapi_open_pktchan_recv_i(&mcapi_struct->pkt_rx_handle, rx_endp,
121
                                                          &request, &mcapi_struct->status);
122
 
123
                                if (mcapi_struct->status == MCAPI_SUCCESS)
124
                                {
125
                                    /* Wait for the open call to return successfully. */
126
                                    mcapi_wait(&request, &rx_len,
127
                                               &mcapi_struct->status, MCAPI_FTS_TIMEOUT);
128
 
129
                                    /* Tell the other side to send some data. */
130
                                    mcapi_struct->status =
131
                                        MCAPID_TX_Mgmt_Message(mcapi_struct, MCAPID_TX_PKT,
132
                                                               1024, mcapi_struct->local_endp,
133
                                                               0, MCAPI_DEFAULT_PRIO);
134
 
135
                                    if (mcapi_struct->status == MCAPI_SUCCESS)
136
                                    {
137
                                        /* Wait for the response. */
138
                                        mcapi_struct->status =
139
                                            MCAPID_RX_Mgmt_Response(mcapi_struct);
140
 
141
                                        if (mcapi_struct->status == MCAPI_SUCCESS)
142
                                        {
143
                                            /* Receive some data. */
144
                                            mcapi_pktchan_recv_i(mcapi_struct->pkt_rx_handle,
145
                                                                 (void**)&buffer,
146
                                                                 &mcapi_struct->request,
147
                                                                 &mcapi_struct->status);
148
 
149
                                            if (mcapi_struct->status == MCAPI_SUCCESS)
150
                                            {
151
                                                mcapi_wait(&mcapi_struct->request, &rx_len,
152
                                                           &mcapi_struct->status, MCAPI_FTS_TIMEOUT);
153
 
154
                                                if (mcapi_struct->status == MCAPI_SUCCESS)
155
                                                {
156
                                                    mcapi_pktchan_free(buffer, &status);
157
                                                }
158
                                            }
159
                                        }
160
                                    }
161
 
162
                                    /* Close the receive side. */
163
                                    mcapi_packetchan_recv_close_i(mcapi_struct->pkt_rx_handle,
164
                                                                  &request, &status);
165
 
166
                                    if (status == MCAPI_SUCCESS)
167
                                    {
168
                                        /* Wait for the connection to close. */
169
                                        mcapi_wait(&request, &rx_len, &status, MCAPI_FTS_TIMEOUT);
170
                                    }
171
                                }
172
                            }
173
                        }
174
 
175
                        /* Tell the other side to close the send side. */
176
                        status =
177
                            MCAPID_TX_Mgmt_Message(mcapi_struct, MCAPID_MGMT_CLOSE_TX_SIDE_PKT, 1024,
178
                                                   mcapi_struct->local_endp, 0, MCAPI_DEFAULT_PRIO);
179
 
180
                        if (status == MCAPI_SUCCESS)
181
                        {
182
                            /* Wait for the response. */
183
                            status = MCAPID_RX_Mgmt_Response(mcapi_struct);
184
                        }
185
                    }
186
                }
187
            }
188
 
189
            /* Tell the other side to delete the endpoint. */
190
            status =
191
                MCAPID_TX_Mgmt_Message(mcapi_struct, MCAPID_MGMT_DELETE_ENDP, 1024,
192
                                       mcapi_struct->local_endp, 0, MCAPI_DEFAULT_PRIO);
193
 
194
            if (status == MCAPI_SUCCESS)
195
            {
196
                /* Wait for the response. */
197
                status = MCAPID_RX_Mgmt_Response(mcapi_struct);
198
            }
199
        }
200
 
201
        /* Delete the endpoint used in the connection. */
202
        mcapi_delete_endpoint(rx_endp, &status);
203
    }
204
 
205
    /* Set the state of the test to completed. */
206
    mcapi_struct->state = 0;
207
 
208
    /* Allow the next test to run. */
209
    MCAPI_Release_Mutex(&MCAPID_FTS_Mutex);
210
 
211
} /* MCAPI_FTS_Tx_2_19_1 */
212
 
213
/************************************************************************
214
*
215
*   FUNCTION
216
*
217
*       MCAPI_FTS_Tx_2_19_2
218
*
219
*   DESCRIPTION
220
*
221
*       Testing mcapi_pktchan_recv_i - receive data over closed
222
*       connection - no data on endpoint when closed.
223
*
224
*           Node 0 – Create endpoint, open send side, wait for connection,
225
*                    close send side
226
*
227
*           Node 1 – Create endpoint, open receive side, get endpoint on
228
*                    Node 0, open connection, wait for data
229
*
230
*************************************************************************/
231
MCAPI_THREAD_ENTRY(MCAPI_FTS_Tx_2_19_2)
232
{
233
    MCAPID_STRUCT               *mcapi_struct = (MCAPID_STRUCT*)argv;
234
    size_t                      rx_len;
235
    mcapi_status_t              status;
236
    mcapi_endpoint_t            tx_endp, rx_endp;
237
    mcapi_request_t             request;
238
    char                        *buffer;
239
 
240
    /* Don't let any other test run while this test is running. */
241
    MCAPI_Obtain_Mutex(&MCAPID_FTS_Mutex);
242
 
243
    /* An extra endpoint is required for the connection. */
244
    rx_endp = mcapi_create_endpoint(MCAPI_PORT_ANY, &mcapi_struct->status);
245
 
246
    if (mcapi_struct->status == MCAPI_SUCCESS)
247
    {
248
        /* Indicate that a remote endpoint should be created. */
249
        mcapi_struct->status =
250
            MCAPID_TX_Mgmt_Message(mcapi_struct, MCAPID_MGMT_CREATE_ENDP, 1024,
251
                                   mcapi_struct->local_endp, 0, MCAPI_DEFAULT_PRIO);
252
 
253
        if (mcapi_struct->status == MCAPI_SUCCESS)
254
        {
255
            /* Wait for a response. */
256
            mcapi_struct->status = MCAPID_RX_Mgmt_Response(mcapi_struct);
257
 
258
            /* If the endpoint was created. */
259
            if (mcapi_struct->status == MCAPI_SUCCESS)
260
            {
261
                /* Indicate that the endpoint should be opened as a sender. */
262
                mcapi_struct->status =
263
                    MCAPID_TX_Mgmt_Message(mcapi_struct, MCAPID_MGMT_OPEN_TX_SIDE_PKT,
264
                                           1024, mcapi_struct->local_endp, 0, MCAPI_DEFAULT_PRIO);
265
 
266
                if (mcapi_struct->status == MCAPI_SUCCESS)
267
                {
268
                    /* Wait for a response. */
269
                    mcapi_struct->status = MCAPID_RX_Mgmt_Response(mcapi_struct);
270
 
271
                    /* If the receive side was opened. */
272
                    if (mcapi_struct->status == MGC_MCAPI_ERR_NOT_CONNECTED)
273
                    {
274
                        /* Get the send side endpoint. */
275
                        tx_endp = mcapi_get_endpoint(FUNC_BACKEND_NODE_ID, 1024, &mcapi_struct->status);
276
 
277
                        if (mcapi_struct->status == MCAPI_SUCCESS)
278
                        {
279
                            /* Connect the two endpoints. */
280
                            mcapi_connect_pktchan_i(tx_endp, rx_endp,
281
                                                    &mcapi_struct->request,
282
                                                    &mcapi_struct->status);
283
 
284
                            if (mcapi_struct->status == MCAPI_SUCCESS)
285
                            {
286
                                /* Wait for the open to return successfully. */
287
                                mcapi_wait(&mcapi_struct->request, &rx_len,
288
                                           &mcapi_struct->status, MCAPI_FTS_TIMEOUT);
289
 
290
                                /* Open the local endpoint as the receiver. */
291
                                mcapi_open_pktchan_recv_i(&mcapi_struct->pkt_rx_handle, rx_endp,
292
                                                          &request, &mcapi_struct->status);
293
 
294
                                if (mcapi_struct->status == MCAPI_SUCCESS)
295
                                {
296
                                    /* Wait for the open call to return successfully. */
297
                                    mcapi_wait(&request, &rx_len,
298
                                               &mcapi_struct->status, MCAPI_FTS_TIMEOUT);
299
 
300
                                    /* Tell the other side to close the send side. */
301
                                    mcapi_struct->status =
302
                                        MCAPID_TX_Mgmt_Message(mcapi_struct,
303
                                                               MCAPID_MGMT_CLOSE_TX_SIDE_PKT,
304
                                                               1024, mcapi_struct->local_endp,
305
                                                               0, MCAPI_DEFAULT_PRIO);
306
 
307
                                    if (mcapi_struct->status == MCAPI_SUCCESS)
308
                                    {
309
                                        /* Wait for the response. */
310
                                        mcapi_struct->status =
311
                                            MCAPID_RX_Mgmt_Response(mcapi_struct);
312
 
313
                                        if (mcapi_struct->status == MCAPI_SUCCESS)
314
                                        {
315
                                            /* Let the other side send the close request. */
316
                                            MCAPID_Sleep(1000);
317
 
318
                                            /* Try to receive some data. */
319
                                            mcapi_pktchan_recv_i(mcapi_struct->pkt_rx_handle,
320
                                                                 (void**)&buffer,
321
                                                                 &mcapi_struct->request,
322
                                                                 &mcapi_struct->status);
323
 
324
                                            /* An error should be returned. */
325
                                            if (mcapi_struct->status == MCAPI_ERR_CHAN_INVALID)
326
                                            {
327
                                                mcapi_struct->status = MCAPI_SUCCESS;
328
                                            }
329
 
330
                                            else
331
                                            {
332
                                                mcapi_struct->status = -1;
333
                                            }
334
                                        }
335
                                    }
336
 
337
                                    /* Close the receive side. */
338
                                    mcapi_packetchan_recv_close_i(mcapi_struct->pkt_rx_handle,
339
                                                                  &request, &status);
340
 
341
                                    if (status == MCAPI_SUCCESS)
342
                                    {
343
                                        /* Wait for the connection to close. */
344
                                        mcapi_wait(&request, &rx_len, &status, MCAPI_FTS_TIMEOUT);
345
                                    }
346
                                }
347
                            }
348
                        }
349
                    }
350
                }
351
            }
352
 
353
            /* Tell the other side to delete the endpoint. */
354
            status =
355
                MCAPID_TX_Mgmt_Message(mcapi_struct, MCAPID_MGMT_DELETE_ENDP, 1024,
356
                                       mcapi_struct->local_endp, 0, MCAPI_DEFAULT_PRIO);
357
 
358
            if (status == MCAPI_SUCCESS)
359
            {
360
                /* Wait for the response. */
361
                status = MCAPID_RX_Mgmt_Response(mcapi_struct);
362
            }
363
        }
364
 
365
        /* Delete the endpoint used in the connection. */
366
        mcapi_delete_endpoint(rx_endp, &status);
367
    }
368
 
369
    /* Set the state of the test to completed. */
370
    mcapi_struct->state = 0;
371
 
372
    /* Allow the next test to run. */
373
    MCAPI_Release_Mutex(&MCAPID_FTS_Mutex);
374
 
375
} /* MCAPI_FTS_Tx_2_19_2 */
376
 
377
/************************************************************************
378
*
379
*   FUNCTION
380
*
381
*       MCAPI_FTS_Tx_2_19_3
382
*
383
*   DESCRIPTION
384
*
385
*       Testing mcapi_pktchan_recv_i - receive data over closed
386
*       connection - data on endpoint when closed.
387
*
388
*           Node 0 – Create endpoint, open send side, wait for connection,
389
*                    send data, close send side
390
*
391
*           Node 1 – Create endpoint, open receive side, get endpoint on
392
*                    Node 0, open connection, wait for data
393
*
394
*************************************************************************/
395
MCAPI_THREAD_ENTRY(MCAPI_FTS_Tx_2_19_3)
396
{
397
    MCAPID_STRUCT               *mcapi_struct = (MCAPID_STRUCT*)argv;
398
    size_t                      rx_len;
399
    mcapi_status_t              status;
400
    mcapi_endpoint_t            tx_endp, rx_endp;
401
    mcapi_request_t             request;
402
    char                        *buffer;
403
 
404
    /* Don't let any other test run while this test is running. */
405
    MCAPI_Obtain_Mutex(&MCAPID_FTS_Mutex);
406
 
407
    /* An extra endpoint is required for the connection. */
408
    rx_endp = mcapi_create_endpoint(MCAPI_PORT_ANY, &mcapi_struct->status);
409
 
410
    if (mcapi_struct->status == MCAPI_SUCCESS)
411
    {
412
        /* Indicate that a remote endpoint should be created. */
413
        mcapi_struct->status =
414
            MCAPID_TX_Mgmt_Message(mcapi_struct, MCAPID_MGMT_CREATE_ENDP, 1024,
415
                                   mcapi_struct->local_endp, 0, MCAPI_DEFAULT_PRIO);
416
 
417
        if (mcapi_struct->status == MCAPI_SUCCESS)
418
        {
419
            /* Wait for a response. */
420
            mcapi_struct->status = MCAPID_RX_Mgmt_Response(mcapi_struct);
421
 
422
            /* If the endpoint was created. */
423
            if (mcapi_struct->status == MCAPI_SUCCESS)
424
            {
425
                /* Indicate that the endpoint should be opened as a sender. */
426
                mcapi_struct->status =
427
                    MCAPID_TX_Mgmt_Message(mcapi_struct, MCAPID_MGMT_OPEN_TX_SIDE_PKT,
428
                                           1024, mcapi_struct->local_endp, 0, MCAPI_DEFAULT_PRIO);
429
 
430
                if (mcapi_struct->status == MCAPI_SUCCESS)
431
                {
432
                    /* Wait for a response. */
433
                    mcapi_struct->status = MCAPID_RX_Mgmt_Response(mcapi_struct);
434
 
435
                    /* If the receive side was opened. */
436
                    if (mcapi_struct->status == MGC_MCAPI_ERR_NOT_CONNECTED)
437
                    {
438
                        /* Get the send side endpoint. */
439
                        tx_endp = mcapi_get_endpoint(FUNC_BACKEND_NODE_ID, 1024, &mcapi_struct->status);
440
 
441
                        if (mcapi_struct->status == MCAPI_SUCCESS)
442
                        {
443
                            /* Connect the two endpoints. */
444
                            mcapi_connect_pktchan_i(tx_endp, rx_endp,
445
                                                    &mcapi_struct->request,
446
                                                    &mcapi_struct->status);
447
 
448
                            if (mcapi_struct->status == MCAPI_SUCCESS)
449
                            {
450
                                /* Wait for the open to return successfully. */
451
                                mcapi_wait(&mcapi_struct->request, &rx_len,
452
                                           &mcapi_struct->status, MCAPI_FTS_TIMEOUT);
453
 
454
                                /* Open the local endpoint as the receiver. */
455
                                mcapi_open_pktchan_recv_i(&mcapi_struct->pkt_rx_handle, rx_endp,
456
                                                          &request, &mcapi_struct->status);
457
 
458
                                if (mcapi_struct->status == MCAPI_SUCCESS)
459
                                {
460
                                    /* Wait for the open to return successfully. */
461
                                    mcapi_wait(&request, &rx_len,
462
                                               &mcapi_struct->status, MCAPI_FTS_TIMEOUT);
463
 
464
                                    /* Tell the other side to send some data. */
465
                                    mcapi_struct->status =
466
                                        MCAPID_TX_Mgmt_Message(mcapi_struct, MCAPID_TX_PKT,
467
                                                               1024, mcapi_struct->local_endp,
468
                                                               0, MCAPI_DEFAULT_PRIO);
469
 
470
                                    if (mcapi_struct->status == MCAPI_SUCCESS)
471
                                    {
472
                                        /* Wait for the response. */
473
                                        mcapi_struct->status =
474
                                            MCAPID_RX_Mgmt_Response(mcapi_struct);
475
 
476
                                        if (mcapi_struct->status == MCAPI_SUCCESS)
477
                                        {
478
                                            /* Tell the other side to close the send side. */
479
                                            mcapi_struct->status =
480
                                                MCAPID_TX_Mgmt_Message(mcapi_struct,
481
                                                                       MCAPID_MGMT_CLOSE_TX_SIDE_PKT,
482
                                                                       1024, mcapi_struct->local_endp,
483
                                                                       0, MCAPI_DEFAULT_PRIO);
484
 
485
                                            if (mcapi_struct->status == MCAPI_SUCCESS)
486
                                            {
487
                                                /* Wait for the response. */
488
                                                mcapi_struct->status =
489
                                                    MCAPID_RX_Mgmt_Response(mcapi_struct);
490
 
491
                                                if (mcapi_struct->status == MCAPI_SUCCESS)
492
                                                {
493
                                                    /* Let the close be processed. */
494
                                                    MCAPID_Sleep(1000);
495
 
496
                                                    /* Try to receive some data. */
497
                                                    mcapi_pktchan_recv_i(mcapi_struct->pkt_rx_handle,
498
                                                                         (void**)&buffer,
499
                                                                         &mcapi_struct->request,
500
                                                                         &mcapi_struct->status);
501
 
502
                                                    /* An error should not be returned. */
503
                                                    if (mcapi_struct->status == MCAPI_SUCCESS)
504
                                                    {
505
                                                        mcapi_wait(&mcapi_struct->request, &rx_len,
506
                                                                   &mcapi_struct->status, MCAPI_FTS_TIMEOUT);
507
 
508
                                                        if (mcapi_struct->status == MCAPI_SUCCESS)
509
                                                        {
510
                                                            mcapi_pktchan_free(buffer, &status);
511
 
512
                                                            /* Try to receive some more data. */
513
                                                            mcapi_pktchan_recv_i(mcapi_struct->pkt_rx_handle,
514
                                                                                 (void**)&buffer,
515
                                                                                 &mcapi_struct->request,
516
                                                                                 &mcapi_struct->status);
517
 
518
                                                            /* An error should be returned. */
519
                                                            if (mcapi_struct->status == MCAPI_ERR_CHAN_INVALID)
520
                                                            {
521
                                                                mcapi_struct->status = MCAPI_SUCCESS;
522
                                                            }
523
 
524
                                                            else
525
                                                            {
526
                                                                mcapi_struct->status = -1;
527
                                                            }
528
                                                        }
529
                                                    }
530
                                                }
531
                                            }
532
 
533
                                            /* Close the receive side. */
534
                                            mcapi_packetchan_recv_close_i(mcapi_struct->pkt_rx_handle,
535
                                                                          &request, &status);
536
 
537
                                            if (status == MCAPI_SUCCESS)
538
                                            {
539
                                                /* Wait for the connection to close. */
540
                                                mcapi_wait(&request, &rx_len, &status,
541
                                                           MCAPI_FTS_TIMEOUT);
542
                                            }
543
                                        }
544
                                    }
545
                                }
546
                            }
547
                        }
548
                    }
549
                }
550
            }
551
 
552
            /* Tell the other side to delete the endpoint. */
553
            status =
554
                MCAPID_TX_Mgmt_Message(mcapi_struct, MCAPID_MGMT_DELETE_ENDP, 1024,
555
                                       mcapi_struct->local_endp, 0, MCAPI_DEFAULT_PRIO);
556
 
557
            if (status == MCAPI_SUCCESS)
558
            {
559
                /* Wait for the response. */
560
                status = MCAPID_RX_Mgmt_Response(mcapi_struct);
561
            }
562
        }
563
 
564
        /* Delete the endpoint used in the connection. */
565
        mcapi_delete_endpoint(rx_endp, &status);
566
    }
567
 
568
    /* Set the state of the test to completed. */
569
    mcapi_struct->state = 0;
570
 
571
    /* Allow the next test to run. */
572
    MCAPI_Release_Mutex(&MCAPID_FTS_Mutex);
573
 
574
} /* MCAPI_FTS_Tx_2_19_3 */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.