~kennylevinsen/greetd

3a32863bc70392449eb10c649cc2917a2ff06ad0 — Aleksei Bavshin 1 year, 11 months ago 2f1810d
ipc: ensure backward compatibility of the protocol

If the client was compiled with the previous version of the protocol,
initialize StartSession.env with the default value instead of failing to
deserialize the message.
1 files changed, 5 insertions(+), 1 deletions(-)

M greetd_ipc/src/lib.rs
M greetd_ipc/src/lib.rs => greetd_ipc/src/lib.rs +5 -1
@@ 75,7 75,11 @@ pub enum Request {

    /// Start a successfully logged in session. This will fail if the session
    /// has pending messages or has encountered an error.
    StartSession { cmd: Vec<String>, env: Vec<String> },
    StartSession {
        cmd: Vec<String>,
        #[serde(default)]
        env: Vec<String>,
    },

    /// Cancel a session. This can only be done if the session has not been
    /// started. Cancel does not have to be called if an error has been