Changeset 1488 in genappalpha


Ignore:
Timestamp:
Jul 10, 2018, 10:13:55 AM (3 years ago)
Author:
ehb
Message:

fixes for install with tcp messaging

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • bin/genapp_mkappconfig

    r1402 r1488  
    239239    $$json{ "messaging" }{ "tcphostip" } = $$cfgjson{ "messaging" }{ "tcphostip" } || die "$0 tcphostip not defined in $cfgjsonf. $cfgjsonnotes";
    240240    $$json{ "messaging" }{ "tcpport" }   = $$cfgjson{ "messaging" }{ "tcpport" } || die "$0 tcpport not defined in $cfgjsonf. $cfgjsonnotes";
     241    $$json{ "messaging" }{ "tcprport" }  = $$cfgjson{ "messaging" }{ "tcprport" } || die "$0 tcprport not defined in $cfgjsonf. $cfgjsonnotes";
     242    $$json{ "messaging" }{ "tcptimeout" }  = $$cfgjson{ "messaging" }{ "tcptimeout" } || die "$0 tcptimeout not defined in $cfgjsonf. $cfgjsonnotes";
    241243
    242244    $$json{ "restricted" }{ "admin" } = ( $admin ) if $admin;
     
    330332        $changes .= "messaging:tcpport updated from [$$appjson{'messaging'}{'tcpport'}] to [$$cfgjson{'messaging'}{'tcpport'}]\n";
    331333        $$appjson{ 'messaging' }{ 'tcpport' } = $$cfgjson{ 'messaging' }{ 'tcpport' };
     334    }
     335
     336    die "$0 tcprport not defined in $cfgjsonf. $cfgjsonnotes" if !$$cfgjson{ 'messaging' }{ 'tcprport' };
     337    if ( $$appjson{ 'messaging' }{ 'tcprport' } ne $$cfgjson{ 'messaging' }{ 'tcprport' } ) {
     338        $changes .= "messaging:tcprport updated from [$$appjson{'messaging'}{'tcprport'}] to [$$cfgjson{'messaging'}{'tcprport'}]\n";
     339        $$appjson{ 'messaging' }{ 'tcprport' } = $$cfgjson{ 'messaging' }{ 'tcprport' };
     340    }
     341
     342    die "$0 tcptimeout not defined in $cfgjsonf. $cfgjsonnotes" if !$$cfgjson{ 'messaging' }{ 'tcptimeout' };
     343    if ( $$appjson{ 'messaging' }{ 'tcptimeout' } ne $$cfgjson{ 'messaging' }{ 'tcptimeout' } ) {
     344        $changes .= "messaging:tcptimeout updated from [$$appjson{'messaging'}{'tcptimeout'}] to [$$cfgjson{'messaging'}{'tcptimeout'}]\n";
     345        $$appjson{ 'messaging' }{ 'tcptimeout' } = $$cfgjson{ 'messaging' }{ 'tcptimeout' };
    332346    }
    333347
  • languages/html5/util/msg-tcpserver.go

    r1376 r1488  
    1717)
    1818
    19 var appconfig = "/home/ehb/genapptest_svn/appconfig.json"
     19var appconfig = "__appconfig__"
    2020
    2121var timeout time.Duration = 60 * time.Second // in seconds, maybe set override in request
  • sbin/setconfig.pl

    r1486 r1488  
    276276
    277277
    278 my $wssport   = $https ? 443 : 80;
    279 my $wsport    = 30777;
    280 my $zmqport   = 30778;
    281 my $zmqhostip = "127.0.0.1";
    282 my $udpport   = 30779;
    283 my $udphostip = "127.0.0.1";
    284 my $tcpport   = 30780;
    285 my $tcphostip = "127.0.0.1";
     278my $wssport    = $https ? 443 : 80;
     279my $wsport     = 30777;
     280my $zmqport    = 30778;
     281my $zmqhostip  = "127.0.0.1";
     282my $udpport    = 30779;
     283my $udphostip  = "127.0.0.1";
     284my $tcpport    = 30780;
     285my $tcphostip  = "127.0.0.1";
     286my $tcprport   = 30781;
     287my $tcptimeout = 300;
    286288
    287289if ( $$json{ "messaging" }{ "wssport" } ) {
     
    371373} else {
    372374    $$json{ 'messaging'}{'tcphostip' }         = $tcphostip;
     375}
     376
     377if ( $$json{ "messaging" }{ "tcprport" } ) {
     378    if ( $$json{'messaging'}{'tcprport'} ne $tcprport ) {
     379        $notice .= "The identified tcprport for this server [$tcprport] is different than that stored [$$json{'messaging'}{'tcprport'}] in $f. " . ( $fo ? "Overwriting with identified value." : "Leaving stored value untouched (use -f to overwrite)." ) . "\n";
     380    }
     381    if ( $fo ) {
     382        $$json{ 'messaging'}{'tcprport' }         = $tcprport;
     383    }
     384} else {
     385    $$json{ 'messaging'}{'tcprport' }         = $tcprport;
     386}
     387
     388if ( $$json{ "messaging" }{ "tcptimeout" } ) {
     389    if ( $$json{'messaging'}{'tcptimeout'} ne $tcptimeout ) {
     390        $notice .= "The identified tcptimeout for this server [$tcptimeout] is different than that stored [$$json{'messaging'}{'tcptimeout'}] in $f. " . ( $fo ? "Overwriting with identified value." : "Leaving stored value untouched (use -f to overwrite)." ) . "\n";
     391    }
     392    if ( $fo ) {
     393        $$json{ 'messaging'}{'tcptimeout' }         = $tcptimeout;
     394    }
     395} else {
     396    $$json{ 'messaging'}{'tcptimeout' }         = $tcptimeout;
    373397}
    374398
Note: See TracChangeset for help on using the changeset viewer.