 
   // Create OSC packet from OSC message or bundle
   OscPacket oscPacket;
-  if(OscPacketInitialiseFromContents(&oscPacket, oscContents)) {
+  if(OscPacketInitialiseFromContents(&oscPacket, oscContents) != OscErrorNone) {
     return; // error: unable to create an OSC packet from the OSC contents
   }
 
   // Encode SLIP packet
   char slipPacket[MAX_OSC_PACKET_SIZE];
   size_t slipPacketSize;
-  if(OscSlipEncodePacket(&oscPacket, &slipPacketSize, slipPacket, sizeof (slipPacket))) {
+  if(OscSlipEncodePacket(&oscPacket, &slipPacketSize, slipPacket, sizeof (slipPacket)) != OscErrorNone) {
     return; // error: the encoded SLIP packet is too long for the size of slipPacket
   }
 

  // If message address is "/digital/write" then get use the message arguments to set a digital pin
  if (OscAddressMatch(oscMessage->oscAddressPattern, "/digital/write")) {
    int32_t pinNumber, pinState;
    if(OscMessageGetInt32(oscMessage, &pinNumber)) {
      return; // error: unable to get first int32 argument
    }
    if(OscMessageGetInt32(oscMessage, &pinState)) {
      return; // error: unable to get second int32 argument
    }
    if(pinNumber < 2) {

void ProcessMessage(const OscTimeTag* const oscTimeTag, OscMessage* const oscMessage) {

  // If message address is "/hello" then send our hello message
  if (OscAddressMatch(oscMessage->oscAddressPattern, "/hello") == true) {
    sendHelloMessage();
    return;
  }
