Changeset 12585


Ignore:
Timestamp:
11/21/11 09:02:21 (13 years ago)
Author:
tbretz
Message:
Updated to v19r26.
Location:
trunk/FACT++/dim
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/dim/README_v19.txt

    r11881 r12585  
    11
    2                     DIM version 19.24 Release Notes
     2                    DIM version 19.26 Release Notes
    33
    44Notes 1 and 2 for Unix Users only
     
    1717                Dns </dev/null >& dns.log &
    1818
    19 NOTE 3: The Version Number service provided by servers is now set to 1924.
     19NOTE 3: The Version Number service provided by servers is now set to 1926.
     20
     2114/09/2011
     22Changes for version 19.26:
     23    - In the notes for version 19.08 there is the following:
     24        - Since version v18r4 where dim_wait() was modified, dim_wait could hang in windows if
     25          the wake_up event was triggered before dim_wait was called. Could affect smi++. Fixed.
     26    - Amasingly enough this seems also to be the case for Linux, dim_wait could hang until there
     27      was some new DIM activity, normally some timer firing... Fixed.
     28    - The Linux DID now accepts an extra parameter: -dns=<dns_node_name>
     29
     3001/09/2011
     31Changes for version 19.25:
     32    - When a Client was releasing a service "at the same time" as the server was deleting the service,
     33      The Connection could be released by mistake - fixed.
     34    - The SERVICE_LIST service could be updated with an empty string if there were two consecutive
     35      dis_start_serving() - fixed.
     36
    2037
    213808/08/2011
  • trunk/FACT++/dim/dim/dim.h

    r11881 r12585  
    1414#include "dim_common.h"
    1515
    16 #define DIM_VERSION_NUMBER 1924
     16#define DIM_VERSION_NUMBER 1926
    1717
    1818#define MY_LITTLE_ENDIAN        0x1
  • trunk/FACT++/dim/src/did/did.c

    r11071 r12585  
    813813                                (!strncmp(opt_str,"ALL",3)))
    814814                                Curr_view_opt = 1;
     815                        else if((!strncmp(opt_str,"dns",3)) ||
     816                                (!strncmp(opt_str,"DNS",3))) {
     817                                char text[132];
     818                                sprintf(text,"DIM_DNS_NODE=%s",opt_str+4);
     819                                putenv(text);
     820                                dim_set_dns_node(opt_str+4);
     821                        }
    815822                        else if((!strncmp(opt_str,"service",7)) ||
    816823                                        (!strncmp(opt_str,"SERVICE",7)))
     
    824831    printf("Did - DIM Information Display\n");
    825832    printf("\t-all             Show ALL Servers\n");
     833    printf("\t-dns=<str>       Show Servers with DIM_DNS_NODE provided by <str>\n");
    826834    printf("\t-service=<str>   Show Servers providing Service <str>\n");
    827835    printf("\t-node=<nodename> Show Servers on Node <nodename>\n");
  • trunk/FACT++/dim/src/dim_thr.c

    r11071 r12585  
    444444pthread_cond_t Global_cond = PTHREAD_COND_INITIALIZER;
    445445#endif
     446int Global_cond_counter = 0;
     447int Global_cond_waiters = 0;
    446448
    447449void dim_lock()
     
    479481{
    480482  pthread_mutex_lock(&Global_cond_mutex);
    481   pthread_cond_wait(&Global_cond, &Global_cond_mutex);
     483  Global_cond_waiters++;
     484  if(!Global_cond_counter)
     485  {
     486        pthread_cond_wait(&Global_cond, &Global_cond_mutex);
     487  }
     488  Global_cond_waiters--;
     489  if(!Global_cond_waiters)
     490          Global_cond_counter--;
    482491  pthread_mutex_unlock(&Global_cond_mutex);
    483492}
     
    486495{
    487496  pthread_mutex_lock(&Global_cond_mutex);
    488   pthread_cond_broadcast(&Global_cond);
     497  if(!Global_cond_waiters)
     498  {
     499        Global_cond_counter = 1;
     500  }
     501  else
     502  {
     503        Global_cond_counter++;
     504        pthread_cond_broadcast(&Global_cond);
     505  }
    489506  pthread_mutex_unlock(&Global_cond_mutex);
    490507}
  • trunk/FACT++/dim/src/dis.c

    r11881 r12585  
    12841284           Net_conns[conn_id].task, Net_conns[conn_id].node);
    12851285}
    1286                 if(!(servp = find_service(dic_packet->service_name)))
    1287                 {
    1288                         release_conn(conn_id, 0, 0);
    1289                         return;
    1290                 }
    12911286                dic_packet->type = vtohl(dic_packet->type);
    12921287                type = dic_packet->type & 0xFFF;
     
    13031298                {
    13041299                        find_release_request(conn_id, vtohl(dic_packet->service_id));
     1300                        return;
     1301                }
     1302                if(!(servp = find_service(dic_packet->service_name)))
     1303                {
     1304                        release_conn(conn_id, 0, 0);
    13051305                        return;
    13061306                }
     
    29372937        *bufp = (int *)service_info_buffer;
    29382938        *size = buff_ptr - service_info_buffer+1;
     2939        if(*size == 1)
     2940                *size = -1;
    29392941        ENABLE_AST
    29402942}
  • trunk/FACT++/dim/src/examples/test_client.c

    r11881 r12585  
    6565{
    6666        char *format;
    67 
     67/*
    6868        format = dic_get_format(0);
    6969        printf("Received format = %s %08x, %d\n",format, format, *size);
     70*/
    7071        if(*tag == 1100)
    7172        {
     
    9495        }
    9596        else
    96                 printf("%s Received %s %08X for Service%03d\n",client_str,buf, buf,*tag);
     97                printf("%s Received %s for Service%03d\n",client_str,buf,*tag);
    9798
    9899/*
     
    124125        {
    125126                sprintf(str,"%s/Service_%03d",argv[2],i);
    126 //              dic_info_service( str, TIMED, 10, 0, 0, rout, i,
    127 //                        "No Link", 8 );
    128127                dic_info_service( str, TIMED, 10, 0, 0, rout, i,
    129                           NULL, 0 );
     128                          "No Link", 8 );
    130129        }
    131130       
  • trunk/FACT++/dim/src/examples/test_server.c

    r11121 r12585  
    2828
    2929        if(tag){}
     30        dim_print_date_time();
    3031        printf("Command received, size = %d, TT size = %d:\n", *size,
    3132               (int)sizeof(TT));
     
    7071        char extra_dns[128];
    7172        int new_dns = 0;
     73        int index = 0;
    7274/*
    7375        int buf_sz, buf_sz1;
     
    156158        while(1)
    157159        {
     160                index++;
    158161/*
    159162                for(i = 0; i < 20; i++)
  • trunk/FACT++/dim/src/examples/test_server.cxx

    r11881 r12585  
    1 //============================================================================
    2 // Name        : emptyDimFormat.cpp
    3 // Author      : Etienne Lyard etienne.lyard@unige.ch
    4 // Version     : 00
    5 // Copyright   :
    6 // Description : Demonstrates the occurence of an empty Dim format from the client's perspective
    7 //============================================================================
    8 /*
    9 #include <dic.hxx>
    10 #include <dis.hxx>
    11 #include <iostream>
    12 using namespace std;
    13 
    14 class EmptyServiceSubscriber : public DimInfo
    15 {
    16     DimStampedInfo* info;
    17         int noLink;
    18 public:
    19     EmptyServiceSubscriber()
    20     {
    21 //        info = new DimStampedInfo("TIME/EMPTY", const_cast<char*>(""), this);
    22                 noLink = -1;
    23         info = new DimStampedInfo("TIME/EMPTY", noLink, this);
    24     }
    25     void infoHandler()
    26     {
    27         DimInfo* I = getInfo();
    28                 int data;
    29         if (I == info)
    30                 {
    31                         data = I->getInt();
    32 //              cout << "EMPTY SERVICE UPDATED. " << "Format: " << I->getFormat() << endl;
    33                         cout << "EMPTY SERVICE UPDATED. " << data << " Format: " << I->getFormat() << endl;
    34                 }
    35     }
    36 };
    37 
    38 int main(int, const char**)
    39 {
    40     DimServer::start("TIME");
    41 
    42     int emptyFormatVariable = 0;
    43     DimService* emptyFormatService = new DimService("TIME/EMPTY", "I:1", &emptyFormatVariable, sizeof(long));
    44     EmptyServiceSubscriber mySubscriber;
    45     //The three lines below create (most of the time) an empty format on the client side.
    46     //We must be able to deal with such cases in our framework because services can be stopped and re-spawned at any time
    47     delete emptyFormatService;
    48     usleep(1000000);
    49     emptyFormatService = new DimService("TIME/EMPTY", "I:1", &emptyFormatVariable, sizeof(long));
    50 
    51     while (1)
    52     {
    53         emptyFormatService->updateService();
    54         usleep(1000000);
    55     }
    56 
    57         return 0;
    58 }
    59 */
    60 
    611#include <iostream>
    622#include <dis.hxx>
Note: See TracChangeset for help on using the changeset viewer.