Sponsored Content
The Lounge What is on Your Mind? Status of Badging System - Beta 1 Post 303028620 by Neo on Friday 11th of January 2019 09:28:01 AM
Old 01-11-2019
I have been testing the badging system, and it works really good.

The only hiccup (with I have a work-around for) is that when I add new badges to the grid in the future, which includes enabling the "Reserved" badges, this causes a change in the hash values and also in the arrays, so a "new badge alert" is issued.

I created a work-around which reverses the order of the PHP array_diff_assoc() call and then compares the size of the two arrays (in forward and reverse order), and so when I bring a new badge on line to the grid, there is no alert generated.

So, I may bring all of the badges "online" even though they are now in "reserve" so that all badges will have a default color assigned; and then assigning a new color to a member (assigning the badge a state) will insure a proper alert.

These are small nuances from testing, and actually, could just bring them all on line and turn off alerts for a day or two, and then turn alerts back on, and it would work out as well.

At some point, when we code a new live application, we need to say "it's good enough" and stop trying to make the code perfect, and I'm getting close to that point.

Basically, the badging system and the alerts work fine and I continue to test them for exceptional situations, and basically, not 100% as I would like, but very good Smilie
These 2 Users Gave Thanks to Neo For This Post:
 

6 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

system status report script

hi i m new to this forum as well as UNIX. I've got an assignment but i don't know how can I start it. can anyone please help to tell me how can I start it? I added here few lines from my assignment. In industry, it is common for a single organisation to provide technical support for a... (0 Replies)
Discussion started by: moco
0 Replies

2. Shell Programming and Scripting

System status query script

Hi, I am trying to access and read certain lines from a configuration XML file on multiple servers (within the LAN). Fortunately the file name and path is always the same for all servers. An example extract of the file is as follows: <DUMMY-SMSC>false</DUMMY-SMSC> ... (2 Replies)
Discussion started by: jaz8212
2 Replies

3. Homework & Coursework Questions

Listing Live System Status

1. Edit a script named update.sh that generates status.html in your web directory: ~/public_html/. I need to write specific commands to show each specific item 2. The generated webpage should include information related to: UNIX : kernel version of ed-lab server USER : number of users on the... (13 Replies)
Discussion started by: devinj
13 Replies

4. What is on Your Mind?

New Badging System - Badges Prototype Beta 1 (Badges Only)

Today I mapped out the new badging system using FA icons, Beta 1 in no particular order except a 6 x 8 grid: https://www.unix.com/members/1-albums215-picture991.png The prototype HTML code for this layout: <style> .fa-badge-grid { font-size: 1.5em; } .row { ... (38 Replies)
Discussion started by: Neo
38 Replies

5. Web Development

Notes with Ravinder on Badging System Development Part II

Part II: Current PHP file Beta 73 Not Optimized: <?php $version = 73; $query = "SELECT * FROM " . TABLE_PREFIX . "user WHERE userid='" . $uid . "'"; $usertable = $db->query_read_slave($query); $modaluser = $db->fetch_array($usertable); $modaluser = gmdate("d F Y", $modaluser); $modaluser... (48 Replies)
Discussion started by: Neo
48 Replies

6. What is on Your Mind?

Badging System: UNIX.COM Bug Hunter Badge (New)

I have moved the bug badge out of reserve and into the main stream. Basically, I will assign a color level like the others, based on who has made a good actionable bug report for UNIX.COM. "Good" means screenshots, links, and even details from web dev tools our the HTML source code. So far,... (0 Replies)
Discussion started by: Neo
0 Replies
SSL_shutdown(3) 						      OpenSSL							   SSL_shutdown(3)

NAME
SSL_shutdown - shut down a TLS/SSL connection SYNOPSIS
#include <openssl/ssl.h> int SSL_shutdown(SSL *ssl); DESCRIPTION
SSL_shutdown() shuts down an active TLS/SSL connection. It sends the "close notify" shutdown alert to the peer. NOTES
SSL_shutdown() tries to send the "close notify" shutdown alert to the peer. Whether the operation succeeds or not, the SSL_SENT_SHUTDOWN flag is set and a currently open session is considered closed and good and will be kept in the session cache for further reuse. The shutdown procedure consists of 2 steps: the sending of the "close notify" shutdown alert and the reception of the peer's "close notify" shutdown alert. According to the TLS standard, it is acceptable for an application to only send its shutdown alert and then close the underlying connection without waiting for the peer's response (this way resources can be saved, as the process can already terminate or serve another connection). When the underlying connection shall be used for more communications, the complete shutdown procedure (bidirec- tional "close notify" alerts) must be performed, so that the peers stay synchronized. SSL_shutdown() supports both uni- and bidirectional shutdown by its 2 step behaviour. When the application is the first party to send the "close notify" alert, SSL_shutdown() will only send the alert and the set the SSL_SENT_SHUTDOWN flag (so that the session is considered good and will be kept in cache). SSL_shutdown() will then return with 0. If a unidirectional shutdown is enough (the underlying connection shall be closed anyway), this first call to SSL_shutdown() is sufficient. In order to complete the bidirectional shutdown handshake, SSL_shutdown() must be called again. The second call will make SSL_shutdown() wait for the peer's "close notify" shutdown alert. On success, the second call to SSL_shutdown() will return with 1. If the peer already sent the "close notify" alert and it was already processed implicitly inside another function (SSL_read(3)), the SSL_RECEIVED_SHUTDOWN flag is set. SSL_shutdown() will send the "close notify" alert, set the SSL_SENT_SHUTDOWN flag and will immediately return with 1. Whether SSL_RECEIVED_SHUTDOWN is already set can be checked using the SSL_get_shutdown() (see also SSL_set_shutdown(3) call. It is therefore recommended, to check the return value of SSL_shutdown() and call SSL_shutdown() again, if the bidirectional shutdown is not yet complete (return value of the first call is 0). As the shutdown is not specially handled in the SSLv2 protocol, SSL_shutdown() will succeed on the first call. The behaviour of SSL_shutdown() additionally depends on the underlying BIO. If the underlying BIO is blocking, SSL_shutdown() will only return once the handshake step has been finished or an error occurred. If the underlying BIO is non-blocking, SSL_shutdown() will also return when the underlying BIO could not satisfy the needs of SSL_shut- down() to continue the handshake. In this case a call to SSL_get_error() with the return value of SSL_shutdown() will yield SSL_ERROR_WANT_READ or SSL_ERROR_WANT_WRITE. The calling process then must repeat the call after taking appropriate action to satisfy the needs of SSL_shutdown(). The action depends on the underlying BIO. When using a non-blocking socket, nothing is to be done, but select() can be used to check for the required condition. When using a buffering BIO, like a BIO pair, data must be written into or retrieved out of the BIO before being able to continue. SSL_shutdown() can be modified to only set the connection to "shutdown" state but not actually send the "close notify" alert messages, see SSL_CTX_set_quiet_shutdown(3). When "quiet shutdown" is enabled, SSL_shutdown() will always succeed and return 1. RETURN VALUES
The following return values can occur: 1 The shutdown was successfully completed. The "close notify" alert was sent and the peer's "close notify" alert was received. 0 The shutdown is not yet finished. Call SSL_shutdown() for a second time, if a bidirectional shutdown shall be performed. The output of SSL_get_error(3) may be misleading, as an erroneous SSL_ERROR_SYSCALL may be flagged even though no error occurred. -1 The shutdown was not successful because a fatal error occurred either at the protocol level or a connection failure occurred. It can also occur if action is need to continue the operation for non-blocking BIOs. Call SSL_get_error(3) with the return value ret to find out the reason. SEE ALSO
SSL_get_error(3), SSL_connect(3), SSL_accept(3), SSL_set_shutdown(3), SSL_CTX_set_quiet_shutdown(3), SSL_clear(3), SSL_free(3), ssl(3), bio(3) 0.9.7d 2002-12-01 SSL_shutdown(3)
All times are GMT -4. The time now is 11:29 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy