~mdavidsaver/epics-base/rtems

« back to all changes in this revision

Viewing changes to src/db/dbCa.c

  • Committer: Andrew Johnson
  • Date: 2009-12-22 23:43:52 UTC
  • Revision ID: anj@aps.anl.gov-20091222234352-kjlrb9bphma5lr1v
Disable "redo last put on reconnection" for STRING writing to ENUM.

Show diffs side-by-side

added added

removed removed

Lines of Context:
347
347
        /* Send as DBR_STRING */
348
348
        if (!pca->pputString) {
349
349
            pca->pputString = dbCalloc(1, MAX_STRING_SIZE);
 
350
/* Disabled by ANJ, needs a link flag to allow user to control this.
 
351
 * Setting these makes the reconnect callback re-do the last CA put.
350
352
            plink->value.pv_link.pvlMask |= pvlOptOutString;
 
353
 */
351
354
        }
352
355
        fConvert = dbFastPutConvertRoutine[dbrType][dbDBRoldToDBFnew[DBR_STRING]];
353
356
        status = fConvert(pbuffer, pca->pputString, 0);
360
363
        if (!pca->pputNative) {
361
364
            pca->pputNative = dbCalloc(pca->nelements,
362
365
                dbr_value_size[ca_field_type(pca->chid)]);
363
 
            plink->value.pv_link.pvlMask |= pvlOptOutString;
 
366
/* Fixed and disabled by ANJ, see comment above.
 
367
            plink->value.pv_link.pvlMask |= pvlOptOutNative;
 
368
 */
364
369
        }
365
370
        if (nRequest == 1){
366
371
            long (*fConvert)(const void *from, void *to, struct dbAddr *paddr);
584
589
    }
585
590
    pca->hasReadAccess = ca_read_access(arg.chid);
586
591
    pca->hasWriteAccess = ca_write_access(arg.chid);
 
592
 
587
593
    if (pca->gotFirstConnection) {
588
594
        if (pca->nelements != ca_element_count(arg.chid) ||
589
595
            pca->dbrType != ca_field_type(arg.chid)) {
596
602
                ~(pvlOptInpNative | pvlOptInpString |
597
603
                  pvlOptOutNative | pvlOptOutString);
598
604
 
599
 
            pca->gotInNative = 0;
600
 
            pca->gotOutNative=0;
601
 
            pca->gotInString=0;
602
 
            pca->gotOutString=0;
 
605
            pca->gotInNative  = 0;
 
606
            pca->gotOutNative = 0;
 
607
            pca->gotInString  = 0;
 
608
            pca->gotOutString = 0;
603
609
            free(pca->pgetNative); pca->pgetNative = 0;
604
610
            free(pca->pgetString); pca->pgetString = 0;
605
611
            free(pca->pputNative); pca->pputNative = 0;