Opened 11 years ago

Closed 11 years ago

#3101 closed enhancement (fixed)

new setting: connect on init

Reported by: manu Owned by:
Priority: trivial Component: Protocol - Newcamd
Severity: low Keywords:
Cc: Sensitive: no


As requested by a friend:

Allow newcamd connections to be established on startup although there isn't a request yet. This mimics acamd behavior and may help to
check for connection problems more easily.

Attachments (2)

0004-newcamd-new-setting-connect-on-init.patch (5.6 KB ) - added by manu 11 years ago.
newmcamd_autoreconnect.diff (8.0 KB ) - added by Nimloth 11 years ago.
by manu

Download all attachments as: .zip

Change History (16)

comment:1 by manu, 11 years ago

Additional note: My patch depends on patch in #3099. But I can rebase them if necessary.

comment:2 by gf, 11 years ago

Looks sane, but shouldn't this be global reader option not only for newcamd?

comment:3 by manu, 11 years ago

I'm not very familiar with other readers except newcamd and cccam. cccam connects on init and gbox + radegast + pandora too (just from looking at the code). So it's not necessary there. The only one left is camd35. I can add the setting there too, just can't test it.

Do you prefer an incremental or an all-in-one patch?

Last edited 11 years ago by manu (previous) (diff)

comment:4 by thatfellow, 11 years ago

Great suggestion, I'm surprised it has not been incorporated into svn.. It is so annoying having to zap a channel to established newcamd connection on startup..

comment:5 by gf, 11 years ago

camd is stateless, each packet is on its own, there is no session, so for camd connecting without sending packets makes no sense.

comment:6 by MadMaxx, 11 years ago

It is a general problem in a proxy-enviroment with active LB now!

"Late-Openings" in the Moment a remote-reader is needed is always a bad idea,
because this brings you bad LB stats for normaly "good" and fast readers.

I prefer an init of ALL remote readers at time of cold start, followed by a permanent idle/keep-alive. This way the status of every reader is basicly known!
(This prevents late-openings and "try&error" when a reader is really needed!)

My sugestion is:

global-setting: ON/OFF,
but overridable per single reader in case the partner don´t wish permanent idling.

Special care must be taken for readers that are offline: When a server is not reachable, a mechanism must prevent "hanging" of the init routine at this point and skip this remote-reader fast enough and init the next reader. Readers, which are not responding, can be marked as offline and tryed later again, something like...

comment:7 by manu, 11 years ago

@gf: So what's your suggestion? Making it global if it's only valid for newcamd seems wrong to me.

comment:8 by MadMaxx, 11 years ago

default = OFF and only valid for newcamd-readers and ON per reader-setting makes most
sense for me for the moment.

comment:9 by manu, 11 years ago

@MadMaxx: my patch adds the value for newcamd readers only. it's off by default and can be changed per reader.

comment:10 by Nimloth, 11 years ago

It should be commited in way that it's now.
Later we can work on adjustments.

comment:11 by MadMaxx, 11 years ago

please commit the patch for newcamd only for now with default off and "enable per reader". This makes most sense.

Then "docman" can do his nice job and document this new function to the reader-section ;-)

comment:12 by Nimloth, 11 years ago

Works very good:
1) Connect to newcamd on itit if correct option is set (default off) for each reader:

connectoninit                 = 1

2) Auto reconnect when newcamd connection is closed (remote server restart or so)

Attached diff (0002-remove-inactivitytimeout-if-not-used-by-reader.patch + 0004-newcamd-new-setting-connect-on-init.patch) - by manu

Version 0, edited 11 years ago by Nimloth (next)

by Nimloth, 11 years ago

Attachment: newmcamd_autoreconnect.diff added

by manu

comment:13 by Nimloth, 11 years ago

Manu, there is one thing that is missing - when remote reader closes connection oscam don't reconnect reader (today I have 3 dc readers). When I kill readers they connect ... but better is auto connect when remote side closes connection. THX

comment:14 by gf, 11 years ago

Resolution: fixed
Status: newclosed

The patch is commited in r8226 - minus the reordering of inputs in webif.

Note: See TracTickets for help on using tickets.