1.0
closed
nobody
None
2017-11-29
2017-09-25
jk
No

The scctl tool uses some functions like setReceiversFromSender() from libupnpp. Unfortunately, in case of an error the reason is not passed to the caller, but only printed as a debug message. As changing the function prototypes means breaking the API, so I would like to know about your opinion.

Discussion

  • medoc
    medoc
    2017-09-27

    I have added interfaces (e.g. setReceiversFromSenderWithStatus()) which do the same thing as the existing one, but returning status. This should be compatible on a binary and source level with older code. Please tell me if they work for you.

     
  • jk
    jk
    2017-10-04

    I've tested the additional interfaces. Some comments:

    1) In setReceiversFromSenderWithStatus() the error reason from getSender() is not passed to the caller.
    2) In setReceiversFromReceiverWithStatus() the error reason for mstate.state != ReceiverState::SCRS_PLAYING is not passed to the caller.

    Of course, the functions are not used by scctl by default yet. The idea is that an external tool communications with scctl in server mode and gets a status if a command was successful or not. In case it was not, an error message shall be available.

     
  • medoc
    medoc
    2017-10-07

    The missing reasons should be fixed by the latest commit: in case the error reason is global and not related to a specific receiver, the function returns false and sets the reason in the first vector entry.

     
  • medoc
    medoc
    2017-10-14

    As you note, using this in scctl right now would break compatibility. Will do it one day. for now a possible approach is to check that the targets are in the desired state after running the scctl command.

     
  • jk
    jk
    2017-10-17

    Sorry for the slow response time. The issue has very little priority right now, so no need to hurry :-)

     
  • medoc
    medoc
    2017-11-29

    • status: open --> closed
     
  • medoc
    medoc
    2017-11-29

    Not a libupnpp issue any more: the libupnpp part is fixed.

     

Cancel   Add attachment